Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
android: Fix pause emulator button crashing the emulator (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
kleidis authored Aug 22, 2024
1 parent 5115f64 commit 9c1f778
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/android/app/src/main/jni/native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,12 @@ void Java_org_citra_citra_1emu_NativeLibrary_surfaceChanged(JNIEnv* env,

void Java_org_citra_citra_1emu_NativeLibrary_surfaceDestroyed([[maybe_unused]] JNIEnv* env,
[[maybe_unused]] jobject obj) {
ANativeWindow_release(s_surf);
s_surf = nullptr;
if (window) {
window->OnSurfaceChanged(s_surf);
if (s_surf != nullptr) {
ANativeWindow_release(s_surf);
s_surf = nullptr;
if (window) {
window->OnSurfaceChanged(s_surf);
}
}
}

Expand Down

0 comments on commit 9c1f778

Please sign in to comment.