Fix crash related to unpause being called after stop

This commit is contained in:
xperia64 2021-01-19 22:04:16 -05:00 committed by bunnei
parent ce6b480bee
commit 0184e1af53
2 changed files with 4 additions and 3 deletions

View File

@ -229,9 +229,9 @@ public final class EmulationActivity extends AppCompatActivity {
finish();
})
.setNegativeButton(android.R.string.cancel, (dialogInterface, i) ->
{
}).setOnDismissListener(dialogInterface ->
NativeLibrary.UnPauseEmulation())
NativeLibrary.UnPauseEmulation())
.setOnCancelListener(dialogInterface ->
NativeLibrary.UnPauseEmulation())
.create()
.show();
}

View File

@ -333,6 +333,7 @@ jobjectArray Java_org_citra_citra_1emu_NativeLibrary_GetInstalledGamePaths(
return jgames;
}
// TODO(xperia64): ensure these cannot be called in an invalid state (e.g. after StopEmulation)
void Java_org_citra_citra_1emu_NativeLibrary_UnPauseEmulation(JNIEnv* env,
[[maybe_unused]] jclass clazz) {
pause_emulation = false;