summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/config.cpp2
-rw-r--r--src/yuzu/configuration/configure_debug.cpp8
-rw-r--r--src/yuzu/configuration/configure_debug.ui91
-rw-r--r--src/yuzu/main.cpp10
-rw-r--r--src/yuzu/main.h3
-rw-r--r--src/yuzu/uisettings.h1
6 files changed, 65 insertions, 50 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp
index 4b943c6ba..d2e735f48 100644
--- a/src/yuzu/configuration/config.cpp
+++ b/src/yuzu/configuration/config.cpp
@@ -775,6 +775,7 @@ void Config::ReadUIValues() {
775 ReadBasicSetting(UISettings::values.pause_when_in_background); 775 ReadBasicSetting(UISettings::values.pause_when_in_background);
776 ReadBasicSetting(UISettings::values.mute_when_in_background); 776 ReadBasicSetting(UISettings::values.mute_when_in_background);
777 ReadBasicSetting(UISettings::values.hide_mouse); 777 ReadBasicSetting(UISettings::values.hide_mouse);
778 ReadBasicSetting(UISettings::values.disable_web_applet);
778 779
779 qt_config->endGroup(); 780 qt_config->endGroup();
780} 781}
@@ -1308,6 +1309,7 @@ void Config::SaveUIValues() {
1308 WriteBasicSetting(UISettings::values.pause_when_in_background); 1309 WriteBasicSetting(UISettings::values.pause_when_in_background);
1309 WriteBasicSetting(UISettings::values.mute_when_in_background); 1310 WriteBasicSetting(UISettings::values.mute_when_in_background);
1310 WriteBasicSetting(UISettings::values.hide_mouse); 1311 WriteBasicSetting(UISettings::values.hide_mouse);
1312 WriteBasicSetting(UISettings::values.disable_web_applet);
1311 1313
1312 qt_config->endGroup(); 1314 qt_config->endGroup();
1313} 1315}
diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp
index c1cf4050c..bd50f7a68 100644
--- a/src/yuzu/configuration/configure_debug.cpp
+++ b/src/yuzu/configuration/configure_debug.cpp
@@ -59,6 +59,13 @@ void ConfigureDebug::SetConfiguration() {
59 ui->disable_loop_safety_checks->setChecked( 59 ui->disable_loop_safety_checks->setChecked(
60 Settings::values.disable_shader_loop_safety_checks.GetValue()); 60 Settings::values.disable_shader_loop_safety_checks.GetValue());
61 ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue()); 61 ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue());
62
63#ifdef YUZU_USE_QT_WEB_ENGINE
64 ui->disable_web_applet->setChecked(UISettings::values.disable_web_applet.GetValue());
65#else
66 ui->disable_web_applet->setEnabled(false);
67 ui->disable_web_applet->setText(QString::fromUtf8("Web applet not compiled"));
68#endif
62} 69}
63 70
64void ConfigureDebug::ApplyConfiguration() { 71void ConfigureDebug::ApplyConfiguration() {
@@ -80,6 +87,7 @@ void ConfigureDebug::ApplyConfiguration() {
80 ui->disable_loop_safety_checks->isChecked(); 87 ui->disable_loop_safety_checks->isChecked();
81 Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked(); 88 Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked();
82 Settings::values.extended_logging = ui->extended_logging->isChecked(); 89 Settings::values.extended_logging = ui->extended_logging->isChecked();
90 UISettings::values.disable_web_applet = ui->disable_web_applet->isChecked();
83 Debugger::ToggleConsole(); 91 Debugger::ToggleConsole();
84 Common::Log::Filter filter; 92 Common::Log::Filter filter;
85 filter.ParseFilterString(Settings::values.log_filter.GetValue()); 93 filter.ParseFilterString(Settings::values.log_filter.GetValue());
diff --git a/src/yuzu/configuration/configure_debug.ui b/src/yuzu/configuration/configure_debug.ui
index 4dd870855..edb525e82 100644
--- a/src/yuzu/configuration/configure_debug.ui
+++ b/src/yuzu/configuration/configure_debug.ui
@@ -8,49 +8,49 @@
8 <property name="title"> 8 <property name="title">
9 <string>Logging</string> 9 <string>Logging</string>
10 </property> 10 </property>
11 <layout class="QGridLayout" name="gridLayout_1"> 11 <layout class="QGridLayout" name="gridLayout_1">
12 <item row="0" column="0" colspan="2"> 12 <item row="0" column="0" colspan="2">
13 <layout class="QHBoxLayout" name="horizontalLayout_1"> 13 <layout class="QHBoxLayout" name="horizontalLayout_1">
14 <item> 14 <item>
15 <widget class="QLabel" name="label_1"> 15 <widget class="QLabel" name="label_1">
16 <property name="text">
17 <string>Global Log Filter</string>
18 </property>
19 </widget>
20 </item>
21 <item>
22 <widget class="QLineEdit" name="log_filter_edit"/>
23 </item>
24 </layout>
25 </item>
26 <item row="1" column="0">
27 <widget class="QCheckBox" name="toggle_console">
28 <property name="text">
29 <string>Show Log in Console</string>
30 </property>
31 </widget>
32 </item>
33 <item row="1" column="1">
34 <widget class="QPushButton" name="open_log_button">
35 <property name="text">
36 <string>Open Log Location</string>
37 </property>
38 </widget>
39 </item>
40 <item row="2" column="0">
41 <widget class="QCheckBox" name="extended_logging">
42 <property name="enabled">
43 <bool>true</bool>
44 </property>
45 <property name="toolTip">
46 <string>When checked, the max size of the log increases from 100 MB to 1 GB</string>
47 </property>
48 <property name="text"> 16 <property name="text">
49 <string>Enable Extended Logging**</string> 17 <string>Global Log Filter</string>
50 </property> 18 </property>
51 </widget> 19 </widget>
52 </item> 20 </item>
53 </layout> 21 <item>
22 <widget class="QLineEdit" name="log_filter_edit"/>
23 </item>
24 </layout>
25 </item>
26 <item row="1" column="0">
27 <widget class="QCheckBox" name="toggle_console">
28 <property name="text">
29 <string>Show Log in Console</string>
30 </property>
31 </widget>
32 </item>
33 <item row="1" column="1">
34 <widget class="QPushButton" name="open_log_button">
35 <property name="text">
36 <string>Open Log Location</string>
37 </property>
38 </widget>
39 </item>
40 <item row="2" column="0">
41 <widget class="QCheckBox" name="extended_logging">
42 <property name="enabled">
43 <bool>true</bool>
44 </property>
45 <property name="toolTip">
46 <string>When checked, the max size of the log increases from 100 MB to 1 GB</string>
47 </property>
48 <property name="text">
49 <string>Enable Extended Logging**</string>
50 </property>
51 </widget>
52 </item>
53 </layout>
54 </widget> 54 </widget>
55 </item> 55 </item>
56 <item> 56 <item>
@@ -183,7 +183,7 @@
183 <string>Advanced</string> 183 <string>Advanced</string>
184 </property> 184 </property>
185 <layout class="QGridLayout" name="gridLayout_4"> 185 <layout class="QGridLayout" name="gridLayout_4">
186 <item> row="0" column="0"> 186 <item row="0" column="0">
187 <widget class="QCheckBox" name="quest_flag"> 187 <widget class="QCheckBox" name="quest_flag">
188 <property name="text"> 188 <property name="text">
189 <string>Kiosk (Quest) Mode</string> 189 <string>Kiosk (Quest) Mode</string>
@@ -218,6 +218,13 @@
218 </property> 218 </property>
219 </widget> 219 </widget>
220 </item> 220 </item>
221 <item row="2" column="1">
222 <widget class="QCheckBox" name="disable_web_applet">
223 <property name="text">
224 <string>Disable Web Applet**</string>
225 </property>
226 </widget>
227 </item>
221 </layout> 228 </layout>
222 </widget> 229 </widget>
223 </item> 230 </item>
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index f2182d901..3b7058a2b 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -582,7 +582,7 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
582#ifdef YUZU_USE_QT_WEB_ENGINE 582#ifdef YUZU_USE_QT_WEB_ENGINE
583 583
584 // Raw input breaks with the web applet, Disable web applets if enabled 584 // Raw input breaks with the web applet, Disable web applets if enabled
585 if (disable_web_applet || Settings::values.enable_raw_input) { 585 if (UISettings::values.disable_web_applet || Settings::values.enable_raw_input) {
586 emit WebBrowserClosed(Service::AM::Applets::WebExitReason::WindowClosed, 586 emit WebBrowserClosed(Service::AM::Applets::WebExitReason::WindowClosed,
587 "http://localhost/"); 587 "http://localhost/");
588 return; 588 return;
@@ -647,12 +647,12 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
647 connect(exit_action, &QAction::triggered, this, [this, &web_browser_view] { 647 connect(exit_action, &QAction::triggered, this, [this, &web_browser_view] {
648 const auto result = QMessageBox::warning( 648 const auto result = QMessageBox::warning(
649 this, tr("Disable Web Applet"), 649 this, tr("Disable Web Applet"),
650 tr("Disabling the web applet will cause it to not be shown again for the rest of the " 650 tr("Disabling the web applet can lead to undefined behavior and should only be used "
651 "emulated session. This can lead to undefined behavior and should only be used with " 651 "with Super Mario 3D All-Stars. Are you sure you want to disable the web "
652 "Super Mario 3D All-Stars. Are you sure you want to disable the web applet?"), 652 "applet?\n(This can be re-enabled in the Debug settings.)"),
653 QMessageBox::Yes | QMessageBox::No); 653 QMessageBox::Yes | QMessageBox::No);
654 if (result == QMessageBox::Yes) { 654 if (result == QMessageBox::Yes) {
655 disable_web_applet = true; 655 UISettings::values.disable_web_applet = true;
656 web_browser_view.SetFinished(true); 656 web_browser_view.SetFinished(true);
657 } 657 }
658 }); 658 });
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index 7659c8000..ab95a7518 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -398,9 +398,6 @@ private:
398 // Last game booted, used for multi-process apps 398 // Last game booted, used for multi-process apps
399 QString last_filename_booted; 399 QString last_filename_booted;
400 400
401 // Disables the web applet for the rest of the emulated session
402 bool disable_web_applet{};
403
404 // Applets 401 // Applets
405 QtSoftwareKeyboardDialog* software_keyboard = nullptr; 402 QtSoftwareKeyboardDialog* software_keyboard = nullptr;
406 403
diff --git a/src/yuzu/uisettings.h b/src/yuzu/uisettings.h
index 06e8b46da..cc5aee382 100644
--- a/src/yuzu/uisettings.h
+++ b/src/yuzu/uisettings.h
@@ -114,6 +114,7 @@ struct Values {
114 114
115 bool configuration_applied; 115 bool configuration_applied;
116 bool reset_to_defaults; 116 bool reset_to_defaults;
117 Settings::BasicSetting<bool> disable_web_applet{true, "disable_web_applet"};
117}; 118};
118 119
119extern Values values; 120extern Values values;