diff options
author | Lioncash <mathew1800@gmail.com> | 2020-08-27 15:16:47 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-08-27 16:11:17 -0400 |
commit | 9e1b0af25907f7a8b960aa5c1e7d931691f40196 (patch) | |
tree | 9bfda0b559cb025da3bc65168d28ee78144daa20 /src/yuzu/configuration/configure_input_player.h | |
parent | 3db9a259771a44278ff34168ba140c2c7815a1cf (diff) |
input_common: Eliminate most global state
Abstracts most of the input mechanisms under an InputSubsystem class
that is managed by the frontends, eliminating any static constructors
and destructors. This gets rid of global accessor functions and also
allows the frontends to have a more fine-grained control over the
lifecycle of the input subsystem.
This also makes it explicit which interfaces rely on the input subsystem
instead of making it opaque in the interface functions. All that remains
to migrate over is the factories, which can be done in a separate
change.
Diffstat (limited to 'src/yuzu/configuration/configure_input_player.h')
-rw-r--r-- | src/yuzu/configuration/configure_input_player.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/yuzu/configuration/configure_input_player.h b/src/yuzu/configuration/configure_input_player.h index 25d4cde5e..a25bc3bd9 100644 --- a/src/yuzu/configuration/configure_input_player.h +++ b/src/yuzu/configuration/configure_input_player.h @@ -10,12 +10,11 @@ #include <optional> #include <string> -#include <QDialog> +#include <QWidget> #include "common/param_package.h" #include "core/settings.h" #include "ui_configure_input.h" -#include "yuzu/uisettings.h" class QCheckBox; class QKeyEvent; @@ -27,6 +26,10 @@ class QString; class QTimer; class QWidget; +namespace InputCommon { +class InputSubsystem; +} + namespace InputCommon::Polling { class DevicePoller; enum class DeviceType; @@ -41,6 +44,7 @@ class ConfigureInputPlayer : public QWidget { public: explicit ConfigureInputPlayer(QWidget* parent, std::size_t player_index, QWidget* bottom_row, + InputCommon::InputSubsystem* input_subsystem_, bool debug = false); ~ConfigureInputPlayer() override; @@ -111,6 +115,8 @@ private: std::size_t player_index; bool debug; + InputCommon::InputSubsystem* input_subsystem; + std::unique_ptr<QTimer> timeout_timer; std::unique_ptr<QTimer> poll_timer; |