Skip to content

Commit

Permalink
Update the undermaintained Qt port to use the new DPI Recalculate
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Feb 20, 2025
1 parent 7a78124 commit e791e31
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Qt/QtMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,15 +840,9 @@ int main(int argc, char *argv[])
if (res.width() < res.height())
res.transpose();

g_display.pixel_xres = res.width();
g_display.pixel_yres = res.height();

// We assume physicalDotsPerInchY is the same as PerInchX.
g_display.dpi_scale_real = screen->logicalDotsPerInchX() / screen->physicalDotsPerInchX();

g_display.dpi_scale = g_display.dpi_scale_real;
g_display.dp_xres = (int)(g_display.pixel_xres * g_display.dpi_scale);
g_display.dp_yres = (int)(g_display.pixel_yres * g_display.dpi_scale);
float dpi_scale = screen->logicalDotsPerInchX() / screen->physicalDotsPerInchX();
g_display.Recalculate(res.width(), res.height(), dpi_scale, 1.0f);

refreshRate = screen->refreshRate();

Expand Down

0 comments on commit e791e31

Please sign in to comment.