summaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configure_input.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-27 15:16:47 -0400
committerLioncash <mathew1800@gmail.com>2020-08-27 16:11:17 -0400
commit9e1b0af25907f7a8b960aa5c1e7d931691f40196 (patch)
tree9bfda0b559cb025da3bc65168d28ee78144daa20 /src/yuzu/configuration/configure_input.h
parent3db9a259771a44278ff34168ba140c2c7815a1cf (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.h')
-rw-r--r--src/yuzu/configuration/configure_input.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/yuzu/configuration/configure_input.h b/src/yuzu/configuration/configure_input.h
index 78ca659da..d08a24f96 100644
--- a/src/yuzu/configuration/configure_input.h
+++ b/src/yuzu/configuration/configure_input.h
@@ -7,8 +7,8 @@
#include <array>
#include <memory>
-#include <QDialog>
#include <QKeyEvent>
+#include <QWidget>
#include "yuzu/configuration/configure_input_advanced.h"
#include "yuzu/configuration/configure_input_player.h"
@@ -19,6 +19,10 @@ class QCheckBox;
class QString;
class QTimer;
+namespace InputCommon {
+class InputSubsystem;
+}
+
namespace Ui {
class ConfigureInput;
}
@@ -32,6 +36,9 @@ public:
explicit ConfigureInput(QWidget* parent = nullptr);
~ConfigureInput() override;
+ /// Initializes the input dialog with the given input subsystem.
+ void Initialize(InputCommon::InputSubsystem* input_subsystem_);
+
/// Save all button configurations to settings file.
void ApplyConfiguration();