diff options
| author | 2022-03-17 19:20:15 -0400 | |
|---|---|---|
| committer | 2022-03-17 19:20:15 -0400 | |
| commit | db637b5a4c02772eb827ed01a6ecb430e4b65daa (patch) | |
| tree | aa8e65a9abe1e6dca038c5f2b1734df85b5f5058 /src | |
| parent | main: Update Disable Web Applet warning (diff) | |
| download | yuzu-db637b5a4c02772eb827ed01a6ecb430e4b65daa.tar.gz yuzu-db637b5a4c02772eb827ed01a6ecb430e4b65daa.tar.xz yuzu-db637b5a4c02772eb827ed01a6ecb430e4b65daa.zip | |
yuzu qt: Save disable_web_applet setting
The web applet causes multiple issues with the rest of the application.
Disable it by default and add a debug option to re-enable it until a
proper solution can be found.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_debug.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu/uisettings.h | 2 |
4 files changed, 6 insertions, 3 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 c2e6bf8d1..bd50f7a68 100644 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp | |||
| @@ -61,7 +61,7 @@ void ConfigureDebug::SetConfiguration() { | |||
| 61 | ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue()); | 61 | ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue()); |
| 62 | 62 | ||
| 63 | #ifdef YUZU_USE_QT_WEB_ENGINE | 63 | #ifdef YUZU_USE_QT_WEB_ENGINE |
| 64 | ui->disable_web_applet->setChecked(UISettings::values.disable_web_applet); | 64 | ui->disable_web_applet->setChecked(UISettings::values.disable_web_applet.GetValue()); |
| 65 | #else | 65 | #else |
| 66 | ui->disable_web_applet->setEnabled(false); | 66 | ui->disable_web_applet->setEnabled(false); |
| 67 | ui->disable_web_applet->setText(QString::fromUtf8("Web applet not compiled")); | 67 | ui->disable_web_applet->setText(QString::fromUtf8("Web applet not compiled")); |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index b137d5e38..617c42734 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -653,7 +653,8 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url, | |||
| 653 | const auto result = QMessageBox::warning( | 653 | const auto result = QMessageBox::warning( |
| 654 | this, tr("Disable Web Applet"), | 654 | this, tr("Disable Web Applet"), |
| 655 | tr("Disabling the web applet can lead to undefined behavior and should only be used " | 655 | tr("Disabling the web applet can lead to undefined behavior and should only be used " |
| 656 | "with Super Mario 3D All-Stars. Are you sure you want to disable the web applet?"), | 656 | "with Super Mario 3D All-Stars. Are you sure you want to disable the web " |
| 657 | "applet?\n(This can be re-enabled in the Debug settings.)"), | ||
| 657 | QMessageBox::Yes | QMessageBox::No); | 658 | QMessageBox::Yes | QMessageBox::No); |
| 658 | if (result == QMessageBox::Yes) { | 659 | if (result == QMessageBox::Yes) { |
| 659 | UISettings::values.disable_web_applet = true; | 660 | UISettings::values.disable_web_applet = true; |
diff --git a/src/yuzu/uisettings.h b/src/yuzu/uisettings.h index c952843fe..cc5aee382 100644 --- a/src/yuzu/uisettings.h +++ b/src/yuzu/uisettings.h | |||
| @@ -114,7 +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 | bool disable_web_applet{}; | 117 | Settings::BasicSetting<bool> disable_web_applet{true, "disable_web_applet"}; |
| 118 | }; | 118 | }; |
| 119 | 119 | ||
| 120 | extern Values values; | 120 | extern Values values; |