From f721a474e45f9e79a63e072fbc80eb0f206b196e Mon Sep 17 00:00:00 2001 From: David Griswold Date: Thu, 19 Mar 2026 05:46:56 -0700 Subject: [PATCH] force android emu_window to update height and width on surface change, solving aspect ratio issues on some screens (#1907) --- src/android/app/src/main/jni/emu_window/emu_window.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/android/app/src/main/jni/emu_window/emu_window.cpp b/src/android/app/src/main/jni/emu_window/emu_window.cpp index 8458a4f2b..26cd2da56 100644 --- a/src/android/app/src/main/jni/emu_window/emu_window.cpp +++ b/src/android/app/src/main/jni/emu_window/emu_window.cpp @@ -25,6 +25,8 @@ bool EmuWindow_Android::OnSurfaceChanged(ANativeWindow* surface) { render_window = surface; window_info.type = Frontend::WindowSystemType::Android; window_info.render_surface = surface; + window_width = ANativeWindow_getWidth(surface); + window_height = ANativeWindow_getHeight(surface); StopPresenting(); OnFramebufferSizeChanged();