Skip to content

Commit

Permalink
export can_pause
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamiras committed Dec 2, 2023
1 parent 62feb5c commit 3751c1b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rcheevos
7 changes: 7 additions & 0 deletions src/services/AchievementRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ra::services::AchievementRuntime>();
return rc_client_can_pause(pClient.GetClient(), frames_remaining);
}

static void reset()
{
#ifndef RA_UTEST
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions tests/services/AchievementRuntime_Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 3751c1b

Please sign in to comment.