Merge pull request #8035 from lat9nq/disable-web-applet

yuzu qt: Disable the web applet by default
This commit is contained in:
bunnei 2022-03-23 21:08:20 -07:00 committed by GitHub
commit c50f2bd4f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 65 additions and 50 deletions

View file

@ -582,7 +582,7 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
#ifdef YUZU_USE_QT_WEB_ENGINE
// 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,
"http://localhost/");
return;
@ -647,12 +647,12 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
connect(exit_action, &QAction::triggered, this, [this, &web_browser_view] {
const auto result = QMessageBox::warning(
this, tr("Disable Web Applet"),
tr("Disabling the web applet will cause it to not be shown again for the rest of the "
"emulated session. This 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?"),
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?\n(This can be re-enabled in the Debug settings.)"),
QMessageBox::Yes | QMessageBox::No);
if (result == QMessageBox::Yes) {
disable_web_applet = true;
UISettings::values.disable_web_applet = true;
web_browser_view.SetFinished(true);
}
});