summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-11-27 11:02:12 +0100
committerLioncash <mathew1800@gmail.com>2018-11-27 11:02:15 +0100
commitd67e88e59c1a2f1ac8099e5c5684de2dcaf583eb (patch)
tree256a08680512725bb2b9cdea85a046a1acb3ba92
parentyuzu/configure_input: Remove unnecessary includes (diff)
downloadyuzu-d67e88e59c1a2f1ac8099e5c5684de2dcaf583eb.tar
yuzu-d67e88e59c1a2f1ac8099e5c5684de2dcaf583eb.tar.gz
yuzu-d67e88e59c1a2f1ac8099e5c5684de2dcaf583eb.tar.bz2
yuzu-d67e88e59c1a2f1ac8099e5c5684de2dcaf583eb.tar.lz
yuzu-d67e88e59c1a2f1ac8099e5c5684de2dcaf583eb.tar.xz
yuzu-d67e88e59c1a2f1ac8099e5c5684de2dcaf583eb.tar.zst
yuzu-d67e88e59c1a2f1ac8099e5c5684de2dcaf583eb.zip
-rw-r--r--src/yuzu/configuration/configure_input_player.h49
-rw-r--r--src/yuzu/configuration/configure_mouse_advanced.h34
2 files changed, 42 insertions, 41 deletions
diff --git a/src/yuzu/configuration/configure_input_player.h b/src/yuzu/configuration/configure_input_player.h
index b0e5550c5..937f77998 100644
--- a/src/yuzu/configuration/configure_input_player.h
+++ b/src/yuzu/configuration/configure_input_player.h
@@ -9,9 +9,10 @@
#include <memory>
#include <optional>
#include <string>
-#include <unordered_map>
+
#include <QDialog>
#include <QKeyEvent>
+
#include "common/param_package.h"
#include "core/settings.h"
#include "input_common/main.h"
@@ -36,6 +37,29 @@ public:
void applyConfiguration();
private:
+ void OnControllerButtonClick(int i);
+
+ /// Load configuration settings.
+ void loadConfiguration();
+ /// Restore all buttons to their default values.
+ void restoreDefaults();
+ /// Clear all input configuration
+ void ClearAll();
+
+ /// Update UI to reflect current configuration.
+ void updateButtonLabels();
+
+ /// Called when the button was pressed.
+ void handleClick(QPushButton* button,
+ std::function<void(const Common::ParamPackage&)> new_input_setter,
+ InputCommon::Polling::DeviceType type);
+
+ /// Finish polling and configure input using the input_setter
+ void setPollingResult(const Common::ParamPackage& params, bool abort);
+
+ /// Handle key press events.
+ void keyPressEvent(QKeyEvent* event) override;
+
std::unique_ptr<Ui::ConfigureInputPlayer> ui;
u8 player_index;
@@ -77,27 +101,4 @@ private:
std::array<QPushButton*, 4> controller_color_buttons;
std::array<QColor, 4> controller_colors;
-
- void OnControllerButtonClick(int i);
-
- /// Load configuration settings.
- void loadConfiguration();
- /// Restore all buttons to their default values.
- void restoreDefaults();
- /// Clear all input configuration
- void ClearAll();
-
- /// Update UI to reflect current configuration.
- void updateButtonLabels();
-
- /// Called when the button was pressed.
- void handleClick(QPushButton* button,
- std::function<void(const Common::ParamPackage&)> new_input_setter,
- InputCommon::Polling::DeviceType type);
-
- /// Finish polling and configure input using the input_setter
- void setPollingResult(const Common::ParamPackage& params, bool abort);
-
- /// Handle key press events.
- void keyPressEvent(QKeyEvent* event) override;
};
diff --git a/src/yuzu/configuration/configure_mouse_advanced.h b/src/yuzu/configuration/configure_mouse_advanced.h
index 057b3aa72..e04da4bf2 100644
--- a/src/yuzu/configuration/configure_mouse_advanced.h
+++ b/src/yuzu/configuration/configure_mouse_advanced.h
@@ -28,23 +28,6 @@ public:
void applyConfiguration();
private:
- std::unique_ptr<Ui::ConfigureMouseAdvanced> ui;
-
- /// This will be the the setting function when an input is awaiting configuration.
- std::optional<std::function<void(const Common::ParamPackage&)>> input_setter;
-
- std::array<QPushButton*, Settings::NativeMouseButton::NumMouseButtons> button_map;
- std::array<Common::ParamPackage, Settings::NativeMouseButton::NumMouseButtons> buttons_param;
-
- std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> device_pollers;
-
- std::unique_ptr<QTimer> timeout_timer;
- std::unique_ptr<QTimer> poll_timer;
-
- /// A flag to indicate if keyboard keys are okay when configuring an input. If this is false,
- /// keyboard events are ignored.
- bool want_keyboard_keys = false;
-
/// Load configuration settings.
void loadConfiguration();
/// Restore all buttons to their default values.
@@ -65,4 +48,21 @@ private:
/// Handle key press events.
void keyPressEvent(QKeyEvent* event) override;
+
+ std::unique_ptr<Ui::ConfigureMouseAdvanced> ui;
+
+ /// This will be the the setting function when an input is awaiting configuration.
+ std::optional<std::function<void(const Common::ParamPackage&)>> input_setter;
+
+ std::array<QPushButton*, Settings::NativeMouseButton::NumMouseButtons> button_map;
+ std::array<Common::ParamPackage, Settings::NativeMouseButton::NumMouseButtons> buttons_param;
+
+ std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> device_pollers;
+
+ std::unique_ptr<QTimer> timeout_timer;
+ std::unique_ptr<QTimer> poll_timer;
+
+ /// A flag to indicate if keyboard keys are okay when configuring an input. If this is false,
+ /// keyboard events are ignored.
+ bool want_keyboard_keys = false;
};