mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 13:27:41 -07:00
fix OSD scaling on hiDPI screens
This commit is contained in:
parent
f905b6fb93
commit
ab8938a695
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -591,7 +591,7 @@ void ScreenPanelGL::drawScreenGL()
|
||||
screenSettingsLock.unlock();
|
||||
|
||||
OSD::Update();
|
||||
OSD::DrawGL(w, h);
|
||||
OSD::DrawGL(w, h, factor);
|
||||
|
||||
glContext->SwapBuffers();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user