Qt/RenderWidget: Account for devicePixelRatio when auto-adjusting window size

This commit is contained in:
Techjar 2019-09-20 21:07:02 -04:00
parent a7d4be79ae
commit 3006c73bf6
1 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,9 @@ RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
if (!Config::Get(Config::MAIN_RENDER_WINDOW_AUTOSIZE) || isFullScreen() || isMaximized())
return;
resize(w, h);
const auto dpr = window()->windowHandle()->screen()->devicePixelRatio();
resize(w / dpr, h / dpr);
});
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {