Handle Pausing in AchievementManager

There are two pieces of functionality to be added here. One, we want to disallow pausing too frequently, as it may be used as an artificial slowdown. This is handled within the client, which can tell us if a pause is allowed. Two, we want to call rc_client_idle on a periodic basis so the connection with the server can be maintained even while the emulator is paused.
This commit is contained in:
LillyJadeKatrin
2024-06-13 19:58:18 -04:00
parent 01b44837f4
commit 33081184bb
4 changed files with 74 additions and 5 deletions

View File

@ -103,6 +103,9 @@ public:
void DoFrame();
bool CanPause();
void DoIdle();
std::recursive_mutex& GetLock();
void SetHardcoreMode();
bool IsHardcoreModeActive() const;
@ -194,6 +197,7 @@ private:
Badge m_default_game_badge;
Badge m_default_unlocked_badge;
Badge m_default_locked_badge;
std::atomic_bool m_background_execution_allowed = true;
Badge m_player_badge;
Hash m_game_hash{};
u32 m_game_id = 0;