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:48:52 +02:00
parent 57b145990d
commit c3be049571
6 changed files with 10 additions and 8 deletions

View File

@ -271,10 +271,12 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_UnPauseEmula
Core::SetState(Core::System::GetInstance(), Core::State::Running);
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_PauseEmulation(JNIEnv*, jclass)
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_PauseEmulation(
JNIEnv*, jclass, bool override_achievement_restrictions)
{
HostThreadLock guard;
Core::SetState(Core::System::GetInstance(), Core::State::Paused);
Core::SetState(Core::System::GetInstance(), Core::State::Paused, true,
override_achievement_restrictions);
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulation(JNIEnv*, jclass)