2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

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

View file

@ -61,7 +61,7 @@ void ConfigureDebug::SetConfiguration() {
ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue());
#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
ui->disable_web_applet->setEnabled(false);
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(
this, tr("Disable Web Applet"),
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);
if (result == QMessageBox::Yes) {
UISettings::values.disable_web_applet = true;

View file

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