mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
Qt: Fix "Render To Main"
This commit is contained in:
parent
2588b5e40e
commit
6f65238efc
2 changed files with 10 additions and 2 deletions
|
@ -158,8 +158,14 @@ bool RenderWidget::event(QEvent* event)
|
|||
const QResizeEvent* se = static_cast<QResizeEvent*>(event);
|
||||
QSize new_size = se->size();
|
||||
|
||||
const auto dpr =
|
||||
QGuiApplication::screens()[QApplication::desktop()->screenNumber(this)]->devicePixelRatio();
|
||||
auto* desktop = QApplication::desktop();
|
||||
|
||||
int screen_nr = desktop->screenNumber(this);
|
||||
|
||||
if (screen_nr == -1)
|
||||
screen_nr = desktop->screenNumber(parentWidget());
|
||||
|
||||
const auto dpr = desktop->screen(screen_nr)->devicePixelRatio();
|
||||
|
||||
emit SizeChanged(new_size.width() * dpr, new_size.height() * dpr);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue