Allow setting window size on android.

This commit is contained in:
Bradlee Barnes 2026-04-26 21:54:18 +00:00 committed by GitHub
parent 8e82249f65
commit c1a3cf7e9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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