diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-09-17 12:00:29 -0400 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-11-15 23:33:19 -0500 |
commit | 75eaab2e0f48eb588c1bfb85f96630e199fbc1da (patch) | |
tree | b32ae39414e12787932aed24a5e42c39fcba47cb /src/yuzu/configuration/configure_input_player.h | |
parent | 9d4edd4e88d291aa4b778b74f6e9daa9dd358d2b (diff) |
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/yuzu/configuration/configure_input_player.h')
-rw-r--r-- | src/yuzu/configuration/configure_input_player.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/yuzu/configuration/configure_input_player.h b/src/yuzu/configuration/configure_input_player.h index c19aefffa..a5414e624 100644 --- a/src/yuzu/configuration/configure_input_player.h +++ b/src/yuzu/configuration/configure_input_player.h @@ -51,8 +51,11 @@ public: /// Save all button configurations to settings file. void ApplyConfiguration(); + /// Set the connection state checkbox (used to sync state). + void ConnectPlayer(bool connected); + /// Update the input devices combobox. - void UpdateInputDevices(); + void UpdateInputDeviceCombobox(); /// Restore all buttons to their default values. void RestoreDefaults(); @@ -60,9 +63,6 @@ public: /// Clear all input configuration. void ClearAll(); - /// Set the connection state checkbox (used to sync state). - void ConnectPlayer(bool connected); - signals: /// Emitted when this controller is connected by the user. void Connected(bool connected); @@ -89,6 +89,9 @@ private: /// Finish polling and configure input using the input_setter. void SetPollingResult(const Common::ParamPackage& params, bool abort); + /// Checks whether a given input can be accepted. + bool IsInputAcceptable(const Common::ParamPackage& params) const; + /// Handle mouse button press events. void mousePressEvent(QMouseEvent* event) override; @@ -98,8 +101,8 @@ private: /// Update UI to reflect current configuration. void UpdateUI(); - /// Update the controller selection combobox - void UpdateControllerCombobox(); + /// Update the available input devices. + void UpdateInputDevices(); /// Update the current controller icon. void UpdateControllerIcon(); @@ -164,7 +167,7 @@ private: bool want_keyboard_mouse = false; /// List of physical devices users can map with. If a SDL backed device is selected, then you - /// can usue this device to get a default mapping. + /// can use this device to get a default mapping. std::vector<Common::ParamPackage> input_devices; /// Bottom row is where console wide settings are held, and its "owned" by the parent |