Android: Don't let RetroAchievements override onPause

When Android sends Dolphin to the background, emulation *must* pause,
otherwise emulation continues running and continues outputting audio to
the user. RetroAchievements mustn't be allowed to override it.
This commit is contained in:
JosJuice
2025-07-26 19:59:08 +02:00
parent 57b145990d
commit c3be049571
6 changed files with 10 additions and 8 deletions
+2 -2
View File
@@ -672,7 +672,7 @@ static void EmuThread(Core::System& system, std::unique_ptr<BootParameters> boot
// Set or get the running state
void SetState(Core::System& system, State state, bool report_state_change,
bool initial_execution_state)
bool override_achievement_restrictions)
{
// State cannot be controlled until the CPU Thread is operational
if (s_state.load() != State::Running)
@@ -682,7 +682,7 @@ void SetState(Core::System& system, State state, bool report_state_change,
{
case State::Paused:
#ifdef USE_RETRO_ACHIEVEMENTS
if (!initial_execution_state && !AchievementManager::GetInstance().CanPause())
if (!override_achievement_restrictions && !AchievementManager::GetInstance().CanPause())
return;
#endif // USE_RETRO_ACHIEVEMENTS
// NOTE: GetState() will return State::Paused immediately, even before anything has
+1 -1
View File
@@ -146,7 +146,7 @@ bool WantsDeterminism();
// [NOT THREADSAFE] For use by Host only
void SetState(Core::System& system, State state, bool report_state_change = true,
bool initial_execution_state = false);
bool override_achievement_restrictions = false);
State GetState(Core::System& system);
void SaveScreenShot();