mirror of
https://github.com/mandarine3ds/mandarine.git
synced 2024-11-27 00:10:23 +00:00
android: Fix pause emulator button crashing the emulator
This commit is contained in:
parent
0d5180b60a
commit
a6cc7b084d
@ -307,10 +307,12 @@ void Java_io_github_mandarine3ds_mandarine_NativeLibrary_surfaceChanged(
|
||||
|
||||
void Java_io_github_mandarine3ds_mandarine_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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user