diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-02-14 22:29:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-14 22:29:35 +0100 |
commit | 58a2c19982c4baaf6f3ef59a313be25f7dc5eed1 (patch) | |
tree | 42d571936191610d49abb726e7fecb16f0ce9323 /src | |
parent | Merge pull request #9795 from Kelebek1/biquad_fix (diff) | |
download | yuzu-58a2c19982c4baaf6f3ef59a313be25f7dc5eed1.tar yuzu-58a2c19982c4baaf6f3ef59a313be25f7dc5eed1.tar.gz yuzu-58a2c19982c4baaf6f3ef59a313be25f7dc5eed1.tar.bz2 yuzu-58a2c19982c4baaf6f3ef59a313be25f7dc5eed1.tar.lz yuzu-58a2c19982c4baaf6f3ef59a313be25f7dc5eed1.tar.xz yuzu-58a2c19982c4baaf6f3ef59a313be25f7dc5eed1.tar.zst yuzu-58a2c19982c4baaf6f3ef59a313be25f7dc5eed1.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/main.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 62dfc526a..c278d8dab 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -3167,20 +3167,8 @@ void GMainWindow::ShowFullscreen() { window->hide(); window->setWindowFlags(window->windowFlags() | Qt::FramelessWindowHint); const auto screen_geometry = GuessCurrentScreen(window)->geometry(); - // NB: On Windows, a borderless window will be treated the same as exclusive fullscreen - // when the window geometry matches the physical dimensions of the screen. - // However, with High DPI scaling, when the devicePixelRatioF() is > 1, the borderless - // window apparently is not treated as exclusive fullscreen and functions correctly. - // One can verify and replicate this behavior by using a high resolution (4K) display, - // and switching between 100% and 200% scaling in Windows' display settings. - // At 100%, without the addition of 1, it is treated as exclusive fullscreen. - // At 200%, with or without the addition of 1, it is treated as borderless windowed. - // Therefore, we can use (read: abuse) this difference in behavior to fix this issue for - // those with higher resolution displays when the Qt scaling ratio is > 1. - // Should this behavior be changed in the future, please revisit this workaround. - const bool must_add_one = devicePixelRatioF() == 1.0f; window->setGeometry(screen_geometry.x(), screen_geometry.y(), screen_geometry.width(), - screen_geometry.height() + (must_add_one ? 1 : 0)); + screen_geometry.height() + 1); window->raise(); window->showNormal(); }; |