Fixes centering the window in the SetWindowMonitor() function.

Here the render size has to be used again in case the high dpi flag is enabled.
This commit is contained in:
Dave G 2024-08-01 20:59:08 +02:00
parent 928dc94504
commit 7bd4888a9d

View File

@ -618,8 +618,9 @@ void SetWindowMonitor(int monitor)
{
TRACELOG(LOG_INFO, "GLFW: Selected monitor: [%i] %s", monitor, glfwGetMonitorName(monitors[monitor]));
const int screenWidth = CORE.Window.screen.width;
const int screenHeight = CORE.Window.screen.height;
// Here the render width has to be used again in case high dpi flag is enabled
const int screenWidth = CORE.Window.render.width;
const int screenHeight = CORE.Window.render.height;
int monitorWorkareaX = 0;
int monitorWorkareaY = 0;
int monitorWorkareaWidth = 0;