diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-12-01 11:11:11 -0500 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-12-05 14:02:02 -0500 |
commit | 233a80419633db70f7b9e26be69fe62d6040cecf (patch) | |
tree | d27a57222d900aa52a0e4fc783d8f7bcb72ccab8 /src/yuzu/configuration/config.cpp | |
parent | 59ca8d458d36f6780b17e7d29e97c6084c23b542 (diff) |
configure_input: Add ConfigureInputSimple as default input UI config
Greatly simplifies the current input UI, while still allowing power users to tweak advanced settings. Adds 'input profiles', which are easy autoconfigurations to make getting started easy and fast. Also has a custom option which brings up the current, full UI.
Diffstat (limited to 'src/yuzu/configuration/config.cpp')
-rw-r--r-- | src/yuzu/configuration/config.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index ef028cca34..5e0d149cd9 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -4,6 +4,7 @@ #include <QSettings> #include "common/file_util.h" +#include "configure_input_simple.h" #include "core/hle/service/acc/profile_manager.h" #include "core/hle/service/hid/controllers/npad.h" #include "input_common/main.h" @@ -342,6 +343,13 @@ void Config::ReadTouchscreenValues() { qt_config->endGroup(); } +void Config::ApplyDefaultProfileIfInputInvalid() { + if (!std::any_of(Settings::values.players.begin(), Settings::values.players.end(), + [](const Settings::PlayerInput& in) { return in.connected; })) { + ApplyInputProfileConfiguration(UISettings::values.profile_index); + } +} + void Config::ReadValues() { qt_config->beginGroup("Controls"); @@ -508,6 +516,8 @@ void Config::ReadValues() { UISettings::values.show_console = qt_config->value("showConsole", false).toBool(); UISettings::values.profile_index = qt_config->value("profileIndex", 0).toUInt(); + ApplyDefaultProfileIfInputInvalid(); + qt_config->endGroup(); } |