فهرست منبع

bootmanager: Remove inaccurate switch

Those vulkan settings do not correspond 1:1 to the swap intervals that
they set for OpenGL, so remove it.

bootmanager: Add missing include

I didn't add this log why did it break
lat9nq 3 سال پیش
والد
کامیت
a090a380be
2فایلهای تغییر یافته به همراه3 افزوده شده و 11 حذف شده
  1. 2 11
      src/yuzu/bootmanager.cpp
  2. 1 0
      src/yuzu/bootmanager.h

+ 2 - 11
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);
 

+ 1 - 0
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"