REVIEWED: PR #5674

This commit is contained in:
Ray
2026-03-19 23:35:18 +01:00
parent bca4f83a02
commit 04c5dc4493
2 changed files with 14 additions and 17 deletions

View File

@@ -683,13 +683,11 @@ void InitWindow(int width, int height, const char *title)
return;
}
// FIX: Initialize render dimensions for embedded platforms
// On desktop platforms (GLFW, SDL, etc.), CORE.Window.render.width/height are
// set during window creation. On embedded platforms with no window manager,
// InitPlatform() doesn't set these values, so we initialize them here from
// the screen dimensions (which are set from the InitWindow parameters).
// This fix is required for embedded platforms.
if (CORE.Window.render.width == 0 || CORE.Window.render.height == 0)
// Initialize render dimensions for embedded platforms
// NOTE: On desktop platforms (GLFW, SDL, etc.), CORE.Window.render.width/height are set during window creation
// On embedded platforms with no window manager, InitPlatform() doesn't set these values, so they should be initialized
// here from screen dimensions (which are set from the InitWindow parameters)
if ((CORE.Window.render.width == 0) || (CORE.Window.render.height == 0))
{
CORE.Window.render.width = CORE.Window.screen.width;
CORE.Window.render.height = CORE.Window.screen.height;