From 57227e9b2dfa657101348d47bf335acb72566bd1 Mon Sep 17 00:00:00 2001 From: Greg V Date: Mon, 28 Sep 2020 04:48:34 +0300 Subject: [PATCH] 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. --- src/gl/gl3device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gl/gl3device.cpp b/src/gl/gl3device.cpp index 67eae22..f4b336e 100644 --- a/src/gl/gl3device.cpp +++ b/src/gl/gl3device.cpp @@ -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;