summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEBADBEEF <errno@ebadf.com>2023-01-23 08:36:40 +0100
committerEBADBEEF <errno@ebadf.com>2023-01-23 08:36:40 +0100
commita84ad180e8e16ed04de5551b2f72349e2ec4d215 (patch)
tree0f40a9489a5370c12066af8ce24b1df386cffd37
parentMerge pull request #9555 from abouvier/catch2-update (diff)
downloadyuzu-a84ad180e8e16ed04de5551b2f72349e2ec4d215.tar
yuzu-a84ad180e8e16ed04de5551b2f72349e2ec4d215.tar.gz
yuzu-a84ad180e8e16ed04de5551b2f72349e2ec4d215.tar.bz2
yuzu-a84ad180e8e16ed04de5551b2f72349e2ec4d215.tar.lz
yuzu-a84ad180e8e16ed04de5551b2f72349e2ec4d215.tar.xz
yuzu-a84ad180e8e16ed04de5551b2f72349e2ec4d215.tar.zst
yuzu-a84ad180e8e16ed04de5551b2f72349e2ec4d215.zip
-rw-r--r--src/yuzu/configuration/config.cpp2
-rw-r--r--src/yuzu/configuration/configure_general.cpp4
-rw-r--r--src/yuzu/configuration/configure_general.ui7
-rw-r--r--src/yuzu/main.cpp1
-rw-r--r--src/yuzu/uisettings.h2
5 files changed, 16 insertions, 0 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp
index fd3bb30e1..1f1ef658c 100644
--- a/src/yuzu/configuration/config.cpp
+++ b/src/yuzu/configuration/config.cpp
@@ -836,6 +836,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.controller_applet_disabled);
ReadBasicSetting(UISettings::values.disable_web_applet);
qt_config->endGroup();
@@ -1456,6 +1457,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.controller_applet_disabled);
WriteBasicSetting(UISettings::values.disable_web_applet);
qt_config->endGroup();
diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp
index 7ade01ba6..7783f362a 100644
--- a/src/yuzu/configuration/configure_general.cpp
+++ b/src/yuzu/configuration/configure_general.cpp
@@ -44,6 +44,8 @@ void ConfigureGeneral::SetConfiguration() {
ui->toggle_background_pause->setChecked(UISettings::values.pause_when_in_background.GetValue());
ui->toggle_background_mute->setChecked(UISettings::values.mute_when_in_background.GetValue());
ui->toggle_hide_mouse->setChecked(UISettings::values.hide_mouse.GetValue());
+ ui->toggle_controller_applet_disabled->setEnabled(runtime_lock);
+ ui->toggle_controller_applet_disabled->setChecked(UISettings::values.controller_applet_disabled.GetValue());
ui->toggle_speed_limit->setChecked(Settings::values.use_speed_limit.GetValue());
ui->speed_limit->setValue(Settings::values.speed_limit.GetValue());
@@ -90,6 +92,7 @@ void ConfigureGeneral::ApplyConfiguration() {
UISettings::values.pause_when_in_background = ui->toggle_background_pause->isChecked();
UISettings::values.mute_when_in_background = ui->toggle_background_mute->isChecked();
UISettings::values.hide_mouse = ui->toggle_hide_mouse->isChecked();
+ UISettings::values.controller_applet_disabled = ui->toggle_controller_applet_disabled->isChecked();
// Guard if during game and set to game-specific value
if (Settings::values.use_speed_limit.UsingGlobal()) {
@@ -136,6 +139,7 @@ void ConfigureGeneral::SetupPerGameUI() {
ui->toggle_user_on_boot->setVisible(false);
ui->toggle_background_pause->setVisible(false);
ui->toggle_hide_mouse->setVisible(false);
+ ui->toggle_controller_applet_disabled->setVisible(false);
ui->button_reset_defaults->setVisible(false);
diff --git a/src/yuzu/configuration/configure_general.ui b/src/yuzu/configuration/configure_general.ui
index 5b90b1109..2fa8324fb 100644
--- a/src/yuzu/configuration/configure_general.ui
+++ b/src/yuzu/configuration/configure_general.ui
@@ -103,6 +103,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="toggle_controller_applet_disabled">
+ <property name="text">
+ <string>Disable controller applet</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
</layout>
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 571eacf9f..e57e02652 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1562,6 +1562,7 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p
system->SetAppletFrontendSet({
std::make_unique<QtAmiiboSettings>(*this), // Amiibo Settings
+ (UISettings::values.controller_applet_disabled.GetValue() == true) ? nullptr :
std::make_unique<QtControllerSelector>(*this), // Controller Selector
std::make_unique<QtErrorDisplay>(*this), // Error Display
nullptr, // Mii Editor
diff --git a/src/yuzu/uisettings.h b/src/yuzu/uisettings.h
index db43b7033..20a517d34 100644
--- a/src/yuzu/uisettings.h
+++ b/src/yuzu/uisettings.h
@@ -77,6 +77,8 @@ struct Values {
Settings::Setting<bool> pause_when_in_background{false, "pauseWhenInBackground"};
Settings::Setting<bool> mute_when_in_background{false, "muteWhenInBackground"};
Settings::Setting<bool> hide_mouse{true, "hideInactiveMouse"};
+ Settings::Setting<bool> controller_applet_disabled{false, "disableControllerApplet"};
+
// Set when Vulkan is known to crash the application
bool has_broken_vulkan = false;