diff --git a/src/common/settings_enums.h b/src/common/settings_enums.h index 55acb0ae8c..eaf3ec541d 100644 --- a/src/common/settings_enums.h +++ b/src/common/settings_enums.h @@ -150,7 +150,7 @@ ENUM(ScalingFilter, NearestNeighbor, Bilinear, Bicubic, Gaussian, Lanczos, Scale ENUM(AntiAliasing, None, Fxaa, Smaa); ENUM(AspectRatio, R16_9, R4_3, R21_9, R16_10, Stretch); ENUM(ConsoleMode, Handheld, Docked); -ENUM(AppletMode, HLE, LLE); +ENUM(AppletMode, HLE, LLE, Disabled); ENUM(SpirvOptimizeMode, Never, OnLoad, Always); ENUM(GpuClock, Normal, Boost, Overclock) ENUM(GpuUnswizzleSize, VerySmall, Small, Normal, Large, VeryLarge) diff --git a/src/qt_common/config/shared_translation.cpp b/src/qt_common/config/shared_translation.cpp index d61c84e278..29fbd32de5 100644 --- a/src/qt_common/config/shared_translation.cpp +++ b/src/qt_common/config/shared_translation.cpp @@ -342,9 +342,6 @@ std::unique_ptr InitializeTranslations(QObject* parent) { "it bypasses such prompts and directly exits the emulation.")); INSERT(UISettings, hide_mouse, tr("Hide mouse on inactivity"), tr("Hides the mouse after 2.5s of inactivity.")); - INSERT(UISettings, controller_applet_disabled, tr("Disable controller applet"), - tr("Forcibly disables the use of the controller applet in emulated programs.\n" - "When a program attempts to open the controller applet, it is immediately closed.")); INSERT(UISettings, check_for_updates, tr("Check for updates"), tr("Whether or not to check for updates upon startup.")); @@ -380,6 +377,7 @@ std::unique_ptr ComboboxEnumeration(QObject* parent) { { PAIR(AppletMode, HLE, tr("Custom frontend")), PAIR(AppletMode, LLE, tr("Real applet")), + PAIR(AppletMode, Disabled, tr("Disabled")), }}); translations->insert({Settings::EnumMetadata::Index(), diff --git a/src/qt_common/config/uisettings.h b/src/qt_common/config/uisettings.h index 794d1a029b..a790cfcc22 100644 --- a/src/qt_common/config/uisettings.h +++ b/src/qt_common/config/uisettings.h @@ -127,8 +127,6 @@ struct Values { Setting hide_mouse{ linkage, true, "hideInactiveMouse", Category::UiGeneral, Settings::Specialization::Default, true, true}; - Setting controller_applet_disabled{linkage, false, "disableControllerApplet", - Category::UiGeneral}; // Set when Vulkan is known to crash the application bool has_broken_vulkan = false; diff --git a/src/yuzu/configuration/configure_applets.h b/src/yuzu/configuration/configure_applets.h index 54f494d2f1..02542d73f7 100644 --- a/src/yuzu/configuration/configure_applets.h +++ b/src/yuzu/configuration/configure_applets.h @@ -8,7 +8,6 @@ class QCheckBox; class QLineEdit; -class QComboBox; class QDateTimeEdit; namespace Core { class System; diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index 0f59ee23a6..5e8e04be58 100644 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp @@ -140,7 +140,12 @@ QWidget* Widget::CreateCombobox(std::function& serializer, if (combobox_enumerations.contains(type)) { enumeration = &combobox_enumerations.at(type); for (const auto& [id, name] : *enumeration) { - combobox->addItem(name); + if (type == Settings::EnumMetadata::Index() && + id == static_cast(Settings::AppletMode::Disabled) && + setting.Id() != Settings::values.controller_applet_mode.Id()) { + continue; + } + combobox->addItem(name, id); } } else { return combobox; @@ -158,9 +163,8 @@ QWidget* Widget::CreateCombobox(std::function& serializer, const u32 setting_value = std::strtoul(setting.ToString().c_str(), nullptr, 0); combobox->setCurrentIndex(find_index(setting_value)); - serializer = [this, enumeration]() { - int current = combobox->currentIndex(); - return std::to_string(enumeration->at(current).first); + serializer = [this]() { + return std::to_string(combobox->currentData().toUInt()); }; restore_func = [this, find_index]() { diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp index e2807e80ff..60bfbae5cd 100644 --- a/src/yuzu/main_window.cpp +++ b/src/yuzu/main_window.cpp @@ -1786,7 +1786,7 @@ bool MainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPar QtCommon::system->SetFrontendAppletSet({ std::make_unique(*this), // Amiibo Settings - (UISettings::values.controller_applet_disabled.GetValue() == true) + (Settings::values.controller_applet_mode.GetValue() == Settings::AppletMode::Disabled) ? nullptr : std::make_unique(*this), // Controller Selector std::make_unique(*this), // Error Display