mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-11 06:54:57 +00:00
config(qt): Sanitize docked handheld controller
This commit is contained in:
parent
6ed5b581f0
commit
7f8335f4ae
2 changed files with 13 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "common/fs/fs_util.h"
|
||||
#include "common/settings_enums.h"
|
||||
#include "common/settings_input.h"
|
||||
#include "configuration/shared_widget.h"
|
||||
#include "core/core.h"
|
||||
#include "core/file_sys/control_metadata.h"
|
||||
|
@ -98,6 +99,13 @@ void ConfigurePerGame::ApplyConfiguration() {
|
|||
addons_tab->ApplyConfiguration();
|
||||
input_tab->ApplyConfiguration();
|
||||
|
||||
if (Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked &&
|
||||
Settings::values.players.GetValue()[0].controller_type ==
|
||||
Settings::ControllerType::Handheld) {
|
||||
Settings::values.use_docked_mode.SetValue(Settings::ConsoleMode::Handheld);
|
||||
Settings::values.use_docked_mode.SetGlobal(true);
|
||||
}
|
||||
|
||||
system.ApplySettings();
|
||||
Settings::LogSettings();
|
||||
|
||||
|
|
|
@ -106,6 +106,11 @@ void ConfigureSystem::Setup(const ConfigurationShared::Builder& builder) {
|
|||
push(Settings::values.linkage.by_category[Settings::Category::System]);
|
||||
|
||||
for (auto setting : settings) {
|
||||
if (setting->Id() == Settings::values.use_docked_mode.Id() &&
|
||||
Settings::IsConfiguringGlobal()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ConfigurationShared::Widget* widget = builder.BuildWidget(setting, apply_funcs);
|
||||
|
||||
if (widget == nullptr) {
|
||||
|
|
Loading…
Reference in a new issue