Skip to content

Commit

Permalink
Use glfwGetFramebufferSize instead of glfwGetWindowSize
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
valpackett committed Sep 28, 2020
1 parent 992fe20 commit 9987ffe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gl/gl3device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9987ffe

Please sign in to comment.