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 #include #include -#include + #include #include + #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 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; u8 player_index; @@ -77,27 +101,4 @@ private: std::array controller_color_buttons; std::array 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 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; - - /// This will be the the setting function when an input is awaiting configuration. - std::optional> input_setter; - - std::array button_map; - std::array buttons_param; - - std::vector> device_pollers; - - std::unique_ptr timeout_timer; - std::unique_ptr 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; + + /// This will be the the setting function when an input is awaiting configuration. + std::optional> input_setter; + + std::array button_map; + std::array buttons_param; + + std::vector> device_pollers; + + std::unique_ptr timeout_timer; + std::unique_ptr 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; };