summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-05-02 02:29:13 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-05-03 03:51:30 +0200
commita090a380be674ae001aea47434e1a2f008574a48 (patch)
tree1fdb34cd7b74367102a1a91893bd5a3fa4d89fc1
parentqt_common: Move window info function out of bootmanager (diff)
downloadyuzu-a090a380be674ae001aea47434e1a2f008574a48.tar
yuzu-a090a380be674ae001aea47434e1a2f008574a48.tar.gz
yuzu-a090a380be674ae001aea47434e1a2f008574a48.tar.bz2
yuzu-a090a380be674ae001aea47434e1a2f008574a48.tar.lz
yuzu-a090a380be674ae001aea47434e1a2f008574a48.tar.xz
yuzu-a090a380be674ae001aea47434e1a2f008574a48.tar.zst
yuzu-a090a380be674ae001aea47434e1a2f008574a48.zip
-rw-r--r--src/yuzu/bootmanager.cpp13
-rw-r--r--src/yuzu/bootmanager.h1
2 files changed, 3 insertions, 11 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 98161cc27..b064c9c64 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -153,17 +153,8 @@ public:
// disable vsync for any shared contexts
auto format = share_context->format();
- const int swap_interval = [&]() {
- switch (Settings::values.vsync_mode.GetValue()) {
- case Settings::VSyncMode::Immediate:
- return 0;
- case Settings::VSyncMode::FIFO:
- return 1;
- case Settings::VSyncMode::Mailbox:
- return 2;
- }
- return 0;
- }();
+ const int swap_interval =
+ Settings::values.vsync_mode.GetValue() == Settings::VSyncMode::Immediate ? 0 : 1;
format.setSwapInterval(main_surface ? swap_interval : 0);
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index bb4eca07f..8a69cf973 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -14,6 +14,7 @@
#include <QTouchEvent>
#include <QWidget>
+#include "common/logging/log.h"
#include "common/polyfill_thread.h"
#include "common/thread.h"
#include "core/frontend/emu_window.h"