From d327bb7a45212662254ba03e494c637603dadfda Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Wed, 26 Apr 2023 00:43:13 -0700 Subject: Fix issue with resizing the display on Android when using the compatibility renderer. (cherry picked from commit b438b4a490f81e06c4d850ddd19884b554307018) --- platform/android/java_godot_lib_jni.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platform/android/java_godot_lib_jni.cpp b/platform/android/java_godot_lib_jni.cpp index 1a0087e18d..6b94e75a2c 100644 --- a/platform/android/java_godot_lib_jni.cpp +++ b/platform/android/java_godot_lib_jni.cpp @@ -199,10 +199,9 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, j if (p_surface) { ANativeWindow *native_window = ANativeWindow_fromSurface(env, p_surface); os_android->set_native_window(native_window); - - DisplayServerAndroid::get_singleton()->reset_window(); - DisplayServerAndroid::get_singleton()->notify_surface_changed(p_width, p_height); } + DisplayServerAndroid::get_singleton()->reset_window(); + DisplayServerAndroid::get_singleton()->notify_surface_changed(p_width, p_height); } } } -- cgit v1.2.3