Răsfoiți Sursa

yuzu: Move disable_web_applet to UISettings

lat9nq 4 ani în urmă
părinte
comite
1cbe23ed7b
3 a modificat fișierele cu 3 adăugiri și 5 ștergeri
  1. 2 2
      src/yuzu/main.cpp
  2. 0 3
      src/yuzu/main.h
  3. 1 0
      src/yuzu/uisettings.h

+ 2 - 2
src/yuzu/main.cpp

@@ -587,7 +587,7 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
 #ifdef YUZU_USE_QT_WEB_ENGINE
 #ifdef YUZU_USE_QT_WEB_ENGINE
 
 
     // Raw input breaks with the web applet, Disable web applets if enabled
     // Raw input breaks with the web applet, Disable web applets if enabled
-    if (disable_web_applet || Settings::values.enable_raw_input) {
+    if (UISettings::values.disable_web_applet || Settings::values.enable_raw_input) {
         emit WebBrowserClosed(Service::AM::Applets::WebExitReason::WindowClosed,
         emit WebBrowserClosed(Service::AM::Applets::WebExitReason::WindowClosed,
                               "http://localhost/");
                               "http://localhost/");
         return;
         return;
@@ -657,7 +657,7 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
                "Super Mario 3D All-Stars. Are you sure you want to disable the web applet?"),
                "Super Mario 3D All-Stars. Are you sure you want to disable the web applet?"),
             QMessageBox::Yes | QMessageBox::No);
             QMessageBox::Yes | QMessageBox::No);
         if (result == QMessageBox::Yes) {
         if (result == QMessageBox::Yes) {
-            disable_web_applet = true;
+            UISettings::values.disable_web_applet = true;
             web_browser_view.SetFinished(true);
             web_browser_view.SetFinished(true);
         }
         }
     });
     });

+ 0 - 3
src/yuzu/main.h

@@ -400,9 +400,6 @@ private:
     // Last game booted, used for multi-process apps
     // Last game booted, used for multi-process apps
     QString last_filename_booted;
     QString last_filename_booted;
 
 
-    // Disables the web applet for the rest of the emulated session
-    bool disable_web_applet{};
-
     // Applets
     // Applets
     QtSoftwareKeyboardDialog* software_keyboard = nullptr;
     QtSoftwareKeyboardDialog* software_keyboard = nullptr;
 
 

+ 1 - 0
src/yuzu/uisettings.h

@@ -114,6 +114,7 @@ struct Values {
 
 
     bool configuration_applied;
     bool configuration_applied;
     bool reset_to_defaults;
     bool reset_to_defaults;
+    bool disable_web_applet{};
 };
 };
 
 
 extern Values values;
 extern Values values;