diff options
author | bunnei <bunneidev@gmail.com> | 2020-11-25 11:20:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-25 11:20:46 -0800 |
commit | dcfa1992ea5fa450b64a75503ba487fba401e757 (patch) | |
tree | 68adf47f034e256d19985aed5e578fb0b91d27d9 /src/yuzu/configuration/configure_input_player.h | |
parent | b7f1095980d614842f6264667d9ddd38186d57ff (diff) | |
parent | 8758378dc40e65239db9a1212e123c86200a3bdc (diff) |
Merge pull request #4959 from Morph1984/emulated-controller-styleset
configure_input_player: Use the NpadStyleSet to limit the available controllers shown
Diffstat (limited to 'src/yuzu/configuration/configure_input_player.h')
-rw-r--r-- | src/yuzu/configuration/configure_input_player.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_input_player.h b/src/yuzu/configuration/configure_input_player.h index 23cf6f958..9c30879a2 100644 --- a/src/yuzu/configuration/configure_input_player.h +++ b/src/yuzu/configuration/configure_input_player.h @@ -9,6 +9,7 @@ #include <memory> #include <optional> #include <string> +#include <vector> #include <QWidget> @@ -112,6 +113,15 @@ private: /// Update UI to reflect current configuration. void UpdateUI(); + /// Sets the available controllers. + void SetConnectableControllers(); + + /// Gets the Controller Type for a given controller combobox index. + Settings::ControllerType GetControllerTypeFromIndex(int index) const; + + /// Gets the controller combobox index for a given Controller Type. + int GetIndexFromControllerType(Settings::ControllerType type) const; + /// Update the available input devices. void UpdateInputDevices(); @@ -151,6 +161,9 @@ private: std::unique_ptr<QTimer> timeout_timer; std::unique_ptr<QTimer> poll_timer; + /// Stores a pair of "Connected Controllers" combobox index and Controller Type enum. + std::vector<std::pair<int, Settings::ControllerType>> index_controller_type_pairs; + static constexpr int PLAYER_COUNT = 8; std::array<QCheckBox*, PLAYER_COUNT> player_connected_checkbox; |