diff options
Diffstat (limited to 'src/frontend/qt_sdl/main.cpp')
-rw-r--r-- | src/frontend/qt_sdl/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index f282310..20084ff 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -874,15 +874,15 @@ void ScreenPanelGL::paintGL() { int w = width(); int h = height(); + float factor = devicePixelRatioF(); glClear(GL_COLOR_BUFFER_BIT); - // TODO: check hiDPI compliance of this - glViewport(0, 0, w, h); + glViewport(0, 0, w*factor, h*factor); screenShader->bind(); - screenShader->setUniformValue("uScreenSize", (float)w, (float)h); + screenShader->setUniformValue("uScreenSize", (float)w*factor, (float)h*factor); int frontbuf = GPU::FrontBuffer; glActiveTexture(GL_TEXTURE0); |