Use glfwGetFramebufferSize instead of glfwGetWindowSize

glfwGetFramebufferSize is scaled by the display scale.
This fixes the game being shrunk to the bottom left quarter of the window on Wayland HiDPI setups.
This commit is contained in:
Greg V 2020-09-28 04:48:34 +03:00
parent 7c61a54c5b
commit 57227e9b2d

View File

@ -1156,7 +1156,7 @@ beginUpdate(Camera *cam)
#ifdef LIBRW_SDL2
SDL_GetWindowSize(glGlobals.window, &w, &h);
#else
glfwGetWindowSize(glGlobals.window, &w, &h);
glfwGetFramebufferSize(glGlobals.window, &w, &h);
#endif
}else{
w = cam->frameBuffer->width;