From 3751c1b03387be29e6029d475460c2e86df7bf82 Mon Sep 17 00:00:00 2001 From: Jamiras Date: Sat, 2 Dec 2023 11:50:09 -0700 Subject: [PATCH] export can_pause --- rcheevos | 2 +- src/services/AchievementRuntime.cpp | 7 +++++++ tests/services/AchievementRuntime_Tests.cpp | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/rcheevos b/rcheevos index 8afec6c5..64fcb9ea 160000 --- a/rcheevos +++ b/rcheevos @@ -1 +1 @@ -Subproject commit 8afec6c55e3a0f72368a5a085203bab1b8828ffb +Subproject commit 64fcb9ea3cf990e65343057ace9271ff3b77428e diff --git a/src/services/AchievementRuntime.cpp b/src/services/AchievementRuntime.cpp index afc1da35..f70d393b 100644 --- a/src/services/AchievementRuntime.cpp +++ b/src/services/AchievementRuntime.cpp @@ -2645,6 +2645,12 @@ class AchievementRuntimeExports : private AchievementRuntime return rc_client_is_processing_required(pClient.GetClient()); } + static int can_pause(uint32_t* frames_remaining) + { + const auto& pClient = ra::services::ServiceLocator::Get(); + return rc_client_can_pause(pClient.GetClient(), frames_remaining); + } + static void reset() { #ifndef RA_UTEST @@ -2831,6 +2837,7 @@ static void GetExternalClientV1(rc_client_external_t* pClientExternal) pClientExternal->do_frame = ra::services::AchievementRuntimeExports::do_frame; pClientExternal->idle = ra::services::AchievementRuntimeExports::idle; pClientExternal->is_processing_required = ra::services::AchievementRuntimeExports::is_processing_required; + pClientExternal->can_pause = ra::services::AchievementRuntimeExports::can_pause; pClientExternal->reset = ra::services::AchievementRuntimeExports::reset; pClientExternal->progress_size = ra::services::AchievementRuntimeExports::progress_size; diff --git a/tests/services/AchievementRuntime_Tests.cpp b/tests/services/AchievementRuntime_Tests.cpp index 16cb03a8..1767a6c9 100644 --- a/tests/services/AchievementRuntime_Tests.cpp +++ b/tests/services/AchievementRuntime_Tests.cpp @@ -3164,6 +3164,7 @@ TEST_CLASS(AchievementRuntime_Tests) Assert::IsNotNull((void*)pClient.do_frame, L"do_frame not set"); Assert::IsNotNull((void*)pClient.idle, L"idle not set"); Assert::IsNotNull((void*)pClient.is_processing_required, L"is_processing_required not set"); + Assert::IsNotNull((void*)pClient.can_pause, L"can_pause not set"); Assert::IsNotNull((void*)pClient.reset, L"reset not set"); Assert::IsNotNull((void*)pClient.progress_size, L"progress_size not set");