diff options
| author | 2020-09-17 12:00:29 -0400 | |
|---|---|---|
| committer | 2020-11-15 23:33:19 -0500 | |
| commit | 75eaab2e0f48eb588c1bfb85f96630e199fbc1da (patch) | |
| tree | b32ae39414e12787932aed24a5e42c39fcba47cb /src/input_common/main.cpp | |
| parent | ui/themes: Cleanup UI (diff) | |
| download | yuzu-75eaab2e0f48eb588c1bfb85f96630e199fbc1da.tar.gz yuzu-75eaab2e0f48eb588c1bfb85f96630e199fbc1da.tar.xz yuzu-75eaab2e0f48eb588c1bfb85f96630e199fbc1da.zip | |
configure_input_player: Implement input exclusivity and persistence
With this, the "Input Devices" combobox should accurately reflect the input device being used and disallows inputs from other input devices unless the input device is set to "Any".
Diffstat (limited to 'src/input_common/main.cpp')
| -rw-r--r-- | src/input_common/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp index d32fd8b81..354c734fe 100644 --- a/src/input_common/main.cpp +++ b/src/input_common/main.cpp | |||
| @@ -78,7 +78,7 @@ struct InputSubsystem::Impl { | |||
| 78 | [[nodiscard]] std::vector<Common::ParamPackage> GetInputDevices() const { | 78 | [[nodiscard]] std::vector<Common::ParamPackage> GetInputDevices() const { |
| 79 | std::vector<Common::ParamPackage> devices = { | 79 | std::vector<Common::ParamPackage> devices = { |
| 80 | Common::ParamPackage{{"display", "Any"}, {"class", "any"}}, | 80 | Common::ParamPackage{{"display", "Any"}, {"class", "any"}}, |
| 81 | Common::ParamPackage{{"display", "Keyboard/Mouse"}, {"class", "key"}}, | 81 | Common::ParamPackage{{"display", "Keyboard/Mouse"}, {"class", "keyboard"}}, |
| 82 | }; | 82 | }; |
| 83 | #ifdef HAVE_SDL2 | 83 | #ifdef HAVE_SDL2 |
| 84 | auto sdl_devices = sdl->GetInputDevices(); | 84 | auto sdl_devices = sdl->GetInputDevices(); |
| @@ -96,7 +96,7 @@ struct InputSubsystem::Impl { | |||
| 96 | if (!params.Has("class") || params.Get("class", "") == "any") { | 96 | if (!params.Has("class") || params.Get("class", "") == "any") { |
| 97 | return {}; | 97 | return {}; |
| 98 | } | 98 | } |
| 99 | if (params.Get("class", "") == "key") { | 99 | if (params.Get("class", "") == "keyboard") { |
| 100 | // TODO consider returning the SDL key codes for the default keybindings | 100 | // TODO consider returning the SDL key codes for the default keybindings |
| 101 | return {}; | 101 | return {}; |
| 102 | } | 102 | } |
| @@ -116,7 +116,7 @@ struct InputSubsystem::Impl { | |||
| 116 | if (!params.Has("class") || params.Get("class", "") == "any") { | 116 | if (!params.Has("class") || params.Get("class", "") == "any") { |
| 117 | return {}; | 117 | return {}; |
| 118 | } | 118 | } |
| 119 | if (params.Get("class", "") == "key") { | 119 | if (params.Get("class", "") == "keyboard") { |
| 120 | // TODO consider returning the SDL key codes for the default keybindings | 120 | // TODO consider returning the SDL key codes for the default keybindings |
| 121 | return {}; | 121 | return {}; |
| 122 | } | 122 | } |