diff options
| author | SuperUserNameMan <[email protected]> | 2024-07-09 09:23:14 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-07-09 09:23:14 +0200 |
| commit | 174313acbfa74d2a45fc0207f47ab00fbdb06050 (patch) | |
| tree | fa1bb5650360ca0a8918e4ba419e7319a5cb3467 /src/platforms | |
| parent | fa03246d0e6e4911cb9513065f07ed2014430b05 (diff) | |
| download | raylib-174313acbfa74d2a45fc0207f47ab00fbdb06050.tar.gz raylib-174313acbfa74d2a45fc0207f47ab00fbdb06050.zip | |
`WindowSizeCallback()` should not try to handle DPI since already managed by GLFW (#4143)
If `FLAG_WINDOW_HIGHDPI` is set, `InitPlatform()` will aks GLFW to handle resize window content area based on the monitor content scale using : ` glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE); `
So `WindowSizeCallback()` does not have to handle it a second time.
Diffstat (limited to 'src/platforms')
| -rw-r--r-- | src/platforms/rcore_desktop_glfw.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/platforms/rcore_desktop_glfw.c b/src/platforms/rcore_desktop_glfw.c index 42c64402..56a4e261 100644 --- a/src/platforms/rcore_desktop_glfw.c +++ b/src/platforms/rcore_desktop_glfw.c @@ -1669,23 +1669,9 @@ static void WindowSizeCallback(GLFWwindow *window, int width, int height) if (IsWindowFullscreen()) return; // Set current screen size -#if defined(__APPLE__) + CORE.Window.screen.width = width; CORE.Window.screen.height = height; -#else - if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0) - { - Vector2 windowScaleDPI = GetWindowScaleDPI(); - - CORE.Window.screen.width = (unsigned int)(width/windowScaleDPI.x); - CORE.Window.screen.height = (unsigned int)(height/windowScaleDPI.y); - } - else - { - CORE.Window.screen.width = width; - CORE.Window.screen.height = height; - } -#endif // NOTE: Postprocessing texture is not scaled to new size } |
