Fix getting monitor size

We now get the size of the monitor where the window is located
This commit is contained in:
Le Juez Victor 2023-10-18 16:33:38 +02:00 committed by GitHub
parent 72a6632c1b
commit fced1f8660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1042,7 +1042,7 @@ static int InitPlatform(void)
CORE.Window.ready = true; CORE.Window.ready = true;
SDL_DisplayMode displayMode; SDL_DisplayMode displayMode;
SDL_GetCurrentDisplayMode(0, &displayMode); SDL_GetCurrentDisplayMode(SDL_GetWindowDisplayIndex(platform.window), &displayMode);
CORE.Window.display.width = displayMode.w; CORE.Window.display.width = displayMode.w;
CORE.Window.display.height = displayMode.h; CORE.Window.display.height = displayMode.h;