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.
This commit is contained in:
parent
fa03246d0e
commit
174313acbf
1 changed files with 1 additions and 15 deletions
|
@ -1669,23 +1669,9 @@ static void WindowSizeCallback(GLFWwindow *window, int width, int height)
|
||||||
if (IsWindowFullscreen()) return;
|
if (IsWindowFullscreen()) return;
|
||||||
|
|
||||||
// Set current screen size
|
// 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.width = width;
|
||||||
CORE.Window.screen.height = height;
|
CORE.Window.screen.height = height;
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// NOTE: Postprocessing texture is not scaled to new size
|
// NOTE: Postprocessing texture is not scaled to new size
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue