diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hid/emulated_devices.h | 51 |
1 files changed, 9 insertions, 42 deletions
diff --git a/src/core/hid/emulated_devices.h b/src/core/hid/emulated_devices.h index 4cdbf9dc6..5eab693e4 100644 --- a/src/core/hid/emulated_devices.h +++ b/src/core/hid/emulated_devices.h @@ -23,14 +23,12 @@ using KeyboardModifierDevices = std::array<std::unique_ptr<Common::Input::InputD Settings::NativeKeyboard::NumKeyboardMods>; using MouseButtonDevices = std::array<std::unique_ptr<Common::Input::InputDevice>, Settings::NativeMouseButton::NumMouseButtons>; -using MouseAnalogDevices = std::array<std::unique_ptr<Common::Input::InputDevice>, - Settings::NativeMouseWheel::NumMouseWheels>; +using MouseWheelDevices = std::array<std::unique_ptr<Common::Input::InputDevice>, + Settings::NativeMouseWheel::NumMouseWheels>; using MouseStickDevice = std::unique_ptr<Common::Input::InputDevice>; -using RingAnalogDevice = std::unique_ptr<Common::Input::InputDevice>; using MouseButtonParams = std::array<Common::ParamPackage, Settings::NativeMouseButton::NumMouseButtons>; -using RingAnalogParams = Common::ParamPackage; using KeyboardValues = std::array<Common::Input::ButtonStatus, Settings::NativeKeyboard::NumKeyboardKeys>; @@ -38,36 +36,29 @@ using KeyboardModifierValues = std::array<Common::Input::ButtonStatus, Settings::NativeKeyboard::NumKeyboardMods>; using MouseButtonValues = std::array<Common::Input::ButtonStatus, Settings::NativeMouseButton::NumMouseButtons>; -using MouseAnalogValues = +using MouseWheelValues = std::array<Common::Input::AnalogStatus, Settings::NativeMouseWheel::NumMouseWheels>; using MouseStickValue = Common::Input::TouchStatus; -using RingAnalogValue = Common::Input::AnalogStatus; struct MousePosition { f32 x; f32 y; }; -struct RingSensorForce { - f32 force; -}; - struct DeviceStatus { // Data from input_common KeyboardValues keyboard_values{}; KeyboardModifierValues keyboard_moddifier_values{}; MouseButtonValues mouse_button_values{}; - MouseAnalogValues mouse_analog_values{}; + MouseWheelValues mouse_wheel_values{}; MouseStickValue mouse_stick_value{}; - RingAnalogValue ring_analog_value{}; - // Data for HID serices + // Data for HID services KeyboardKey keyboard_state{}; KeyboardModifier keyboard_moddifier_state{}; MouseButton mouse_button_state{}; MousePosition mouse_position_state{}; AnalogStickState mouse_wheel_state{}; - RingSensorForce ring_analog_state{}; }; enum class DeviceTriggerType { @@ -84,7 +75,7 @@ struct InterfaceUpdateCallback { class EmulatedDevices { public: /** - * Contains all input data related to external devices that aren't necesarily a controller + * Contains all input data related to external devices that aren't necessarily a controller * This includes devices such as the keyboard or mouse */ explicit EmulatedDevices(); @@ -120,15 +111,6 @@ public: /// Reverts any mapped changes made that weren't saved void RestoreConfig(); - // Returns the current mapped ring device - Common::ParamPackage GetRingParam() const; - - /** - * Updates the current mapped ring device - * @param param ParamPackage with ring sensor data to be mapped - */ - void SetRingParam(Common::ParamPackage param); - /// Returns the latest status of button input from the keyboard with parameters KeyboardValues GetKeyboardValues() const; @@ -138,9 +120,6 @@ public: /// Returns the latest status of button input from the mouse with parameters MouseButtonValues GetMouseButtonsValues() const; - /// Returns the latest status of analog input from the ring sensor with parameters - RingAnalogValue GetRingSensorValues() const; - /// Returns the latest status of button input from the keyboard KeyboardKey GetKeyboard() const; @@ -156,9 +135,6 @@ public: /// Returns the latest mouse wheel change AnalogStickState GetMouseWheel() const; - /// Returns the latest ringcon force sensor value - RingSensorForce GetRingSensorForce() const; - /** * Adds a callback to the list of events * @param update_callback InterfaceUpdateCallback that will be triggered @@ -202,19 +178,13 @@ private: * @param callback A CallbackStatus containing the wheel status * @param index wheel ID to be updated */ - void SetMouseAnalog(const Common::Input::CallbackStatus& callback, std::size_t index); + void SetMouseWheel(const Common::Input::CallbackStatus& callback, std::size_t index); /** * Updates the mouse position status of the mouse device * @param callback A CallbackStatus containing the position status */ - void SetMouseStick(const Common::Input::CallbackStatus& callback); - - /** - * Updates the ring analog sensor status of the ring controller - * @param callback A CallbackStatus containing the force status - */ - void SetRingAnalog(const Common::Input::CallbackStatus& callback); + void SetMousePosition(const Common::Input::CallbackStatus& callback); /** * Triggers a callback that something has changed on the device status @@ -224,14 +194,11 @@ private: bool is_configuring{false}; - RingAnalogParams ring_params; - KeyboardDevices keyboard_devices; KeyboardModifierDevices keyboard_modifier_devices; MouseButtonDevices mouse_button_devices; - MouseAnalogDevices mouse_analog_devices; + MouseWheelDevices mouse_wheel_devices; MouseStickDevice mouse_stick_device; - RingAnalogDevice ring_analog_device; mutable std::mutex mutex; mutable std::mutex callback_mutex; |