Fix pause emulator button crashing the emulator

This commit is contained in:
kleidis 2024-08-21 14:39:44 +02:00 committed by OpenSauce
parent 0a6bea8f0c
commit 14d0bb534e

View file

@ -316,11 +316,13 @@ void Java_io_github_lime3ds_android_NativeLibrary_surfaceChanged(JNIEnv* env,
void Java_io_github_lime3ds_android_NativeLibrary_surfaceDestroyed([[maybe_unused]] JNIEnv* env, void Java_io_github_lime3ds_android_NativeLibrary_surfaceDestroyed([[maybe_unused]] JNIEnv* env,
[[maybe_unused]] jobject obj) { [[maybe_unused]] jobject obj) {
if (s_surf != nullptr) {
ANativeWindow_release(s_surf); ANativeWindow_release(s_surf);
s_surf = nullptr; s_surf = nullptr;
if (window) { if (window) {
window->OnSurfaceChanged(s_surf); window->OnSurfaceChanged(s_surf);
} }
}
} }
void Java_io_github_lime3ds_android_NativeLibrary_doFrame([[maybe_unused]] JNIEnv* env, void Java_io_github_lime3ds_android_NativeLibrary_doFrame([[maybe_unused]] JNIEnv* env,