From c1a3cf7e9b295896a97270a2f87f41b3733435a7 Mon Sep 17 00:00:00 2001 From: Bradlee Barnes <69256931+StupidRepo@users.noreply.github.com> Date: Sun, 26 Apr 2026 21:54:18 +0000 Subject: [PATCH 1/2] Allow setting window size on android. --- src/platforms/rcore_android.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/platforms/rcore_android.c b/src/platforms/rcore_android.c index f501fba8aadb..48c7ed093abf 100644 --- a/src/platforms/rcore_android.c +++ b/src/platforms/rcore_android.c @@ -455,7 +455,23 @@ void SetWindowMaxSize(int width, int height) // Set window dimensions void SetWindowSize(int width, int height) { - TRACELOG(LOG_WARNING, "SetWindowSize() not available on target platform"); + CORE.Window.display.width = width; + CORE.Window.display.height = height; + + SetupViewport(width, height); + CORE.Window.currentFbo.width = width; + CORE.Window.currentFbo.height = height; + + CORE.Window.screen.width = width; + CORE.Window.screen.height = height; + + EGLint displayFormat = 0; + eglGetConfigAttrib(platform.device, platform.config, EGL_NATIVE_VISUAL_ID, &displayFormat); + + ANativeWindow_setBuffersGeometry(platform.app->window, + CORE.Window.render.width + CORE.Window.renderOffset.x, + CORE.Window.render.height + CORE.Window.renderOffset.y, + displayFormat); } // Set window opacity, value opacity is between 0.0 and 1.0 From a1cd6e3973f804f875afc1598eee6a79652e2fa4 Mon Sep 17 00:00:00 2001 From: Bradlee Barnes <69256931+StupidRepo@users.noreply.github.com> Date: Mon, 4 May 2026 17:13:34 +0000 Subject: [PATCH 2/2] set display mode to 0 as per review --- src/platforms/rcore_android.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/platforms/rcore_android.c b/src/platforms/rcore_android.c index 48c7ed093abf..a51d775e1720 100644 --- a/src/platforms/rcore_android.c +++ b/src/platforms/rcore_android.c @@ -465,13 +465,10 @@ void SetWindowSize(int width, int height) CORE.Window.screen.width = width; CORE.Window.screen.height = height; - EGLint displayFormat = 0; - eglGetConfigAttrib(platform.device, platform.config, EGL_NATIVE_VISUAL_ID, &displayFormat); - ANativeWindow_setBuffersGeometry(platform.app->window, CORE.Window.render.width + CORE.Window.renderOffset.x, CORE.Window.render.height + CORE.Window.renderOffset.y, - displayFormat); + 0); } // Set window opacity, value opacity is between 0.0 and 1.0