diff --git a/src/frontend/qt_sdl/OSD.cpp b/src/frontend/qt_sdl/OSD.cpp index 25072df782..3734b76b56 100644 --- a/src/frontend/qt_sdl/OSD.cpp +++ b/src/frontend/qt_sdl/OSD.cpp @@ -418,7 +418,7 @@ void DrawNative(QPainter& painter) Rendering.unlock(); } -void DrawGL(float w, float h) +void DrawGL(float w, float h, float factor) { if (!Config::ShowOSD) return; if (!mainWindow || !mainWindow->panel) return; @@ -430,7 +430,7 @@ void DrawGL(float w, float h) glUseProgram(Shader[2]); glUniform2f(uScreenSize, w, h); - glUniform1f(uScaleFactor, mainWindow->devicePixelRatioF()); + glUniform1f(uScaleFactor, factor); glBindBuffer(GL_ARRAY_BUFFER, OSDVertexBuffer); glBindVertexArray(OSDVertexArray); diff --git a/src/frontend/qt_sdl/OSD.h b/src/frontend/qt_sdl/OSD.h index 64131d5bb6..c907a0bb70 100644 --- a/src/frontend/qt_sdl/OSD.h +++ b/src/frontend/qt_sdl/OSD.h @@ -32,7 +32,7 @@ void AddMessage(u32 color, const char* text); void Update(); void DrawNative(QPainter& painter); -void DrawGL(float w, float h); +void DrawGL(float w, float h, float factor); } diff --git a/src/frontend/qt_sdl/Screen.cpp b/src/frontend/qt_sdl/Screen.cpp index 35be7e6afd..d8af6624f2 100644 --- a/src/frontend/qt_sdl/Screen.cpp +++ b/src/frontend/qt_sdl/Screen.cpp @@ -591,7 +591,7 @@ void ScreenPanelGL::drawScreenGL() screenSettingsLock.unlock(); OSD::Update(); - OSD::DrawGL(w, h); + OSD::DrawGL(w, h, factor); glContext->SwapBuffers(); }