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.
This commit is contained in:
lat9nq 2022-03-17 19:20:15 -04:00
parent 7760777c06
commit db637b5a4c
4 changed files with 6 additions and 3 deletions

View file

@ -775,6 +775,7 @@ void Config::ReadUIValues() {
ReadBasicSetting(UISettings::values.pause_when_in_background); ReadBasicSetting(UISettings::values.pause_when_in_background);
ReadBasicSetting(UISettings::values.mute_when_in_background); ReadBasicSetting(UISettings::values.mute_when_in_background);
ReadBasicSetting(UISettings::values.hide_mouse); ReadBasicSetting(UISettings::values.hide_mouse);
ReadBasicSetting(UISettings::values.disable_web_applet);
qt_config->endGroup(); qt_config->endGroup();
} }
@ -1308,6 +1309,7 @@ void Config::SaveUIValues() {
WriteBasicSetting(UISettings::values.pause_when_in_background); WriteBasicSetting(UISettings::values.pause_when_in_background);
WriteBasicSetting(UISettings::values.mute_when_in_background); WriteBasicSetting(UISettings::values.mute_when_in_background);
WriteBasicSetting(UISettings::values.hide_mouse); WriteBasicSetting(UISettings::values.hide_mouse);
WriteBasicSetting(UISettings::values.disable_web_applet);
qt_config->endGroup(); qt_config->endGroup();
} }

View file

@ -61,7 +61,7 @@ void ConfigureDebug::SetConfiguration() {
ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue()); ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue());
#ifdef YUZU_USE_QT_WEB_ENGINE #ifdef YUZU_USE_QT_WEB_ENGINE
ui->disable_web_applet->setChecked(UISettings::values.disable_web_applet); ui->disable_web_applet->setChecked(UISettings::values.disable_web_applet.GetValue());
#else #else
ui->disable_web_applet->setEnabled(false); ui->disable_web_applet->setEnabled(false);
ui->disable_web_applet->setText(QString::fromUtf8("Web applet not compiled")); ui->disable_web_applet->setText(QString::fromUtf8("Web applet not compiled"));

View file

@ -653,7 +653,8 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
const auto result = QMessageBox::warning( const auto result = QMessageBox::warning(
this, tr("Disable Web Applet"), this, tr("Disable Web Applet"),
tr("Disabling the web applet can lead to undefined behavior and should only be used " tr("Disabling the web applet can lead to undefined behavior and should only be used "
"with Super Mario 3D All-Stars. Are you sure you want to disable the web applet?"), "with Super Mario 3D All-Stars. Are you sure you want to disable the web "
"applet?\n(This can be re-enabled in the Debug settings.)"),
QMessageBox::Yes | QMessageBox::No); QMessageBox::Yes | QMessageBox::No);
if (result == QMessageBox::Yes) { if (result == QMessageBox::Yes) {
UISettings::values.disable_web_applet = true; UISettings::values.disable_web_applet = true;

View file

@ -114,7 +114,7 @@ struct Values {
bool configuration_applied; bool configuration_applied;
bool reset_to_defaults; bool reset_to_defaults;
bool disable_web_applet{}; Settings::BasicSetting<bool> disable_web_applet{true, "disable_web_applet"};
}; };
extern Values values; extern Values values;