diff options
| author | 2021-11-29 16:16:05 -0500 | |
|---|---|---|
| committer | 2021-11-29 17:20:14 -0500 | |
| commit | b9b28c0457e81d80fc51670b88692a062ea9e08e (patch) | |
| tree | 1ea29a759a20b4dfb7a36bba19660ed13a9082b4 /src | |
| parent | Merge pull request #7465 from german77/no_input (diff) | |
| download | yuzu-b9b28c0457e81d80fc51670b88692a062ea9e08e.tar.gz yuzu-b9b28c0457e81d80fc51670b88692a062ea9e08e.tar.xz yuzu-b9b28c0457e81d80fc51670b88692a062ea9e08e.zip | |
core: hid: Cleanup and amend documentation
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hid/emulated_console.h | 26 | ||||
| -rw-r--r-- | src/core/hid/emulated_controller.h | 58 | ||||
| -rw-r--r-- | src/core/hid/emulated_devices.h | 38 | ||||
| -rw-r--r-- | src/core/hid/input_converter.h | 23 |
4 files changed, 76 insertions, 69 deletions
diff --git a/src/core/hid/emulated_console.h b/src/core/hid/emulated_console.h index 25c183eee..67981b844 100644 --- a/src/core/hid/emulated_console.h +++ b/src/core/hid/emulated_console.h | |||
| @@ -78,7 +78,7 @@ struct ConsoleUpdateCallback { | |||
| 78 | class EmulatedConsole { | 78 | class EmulatedConsole { |
| 79 | public: | 79 | public: |
| 80 | /** | 80 | /** |
| 81 | * Contains all input data related to the console like motion and touch input | 81 | * Contains all input data within the emulated switch console tablet such as touch and motion |
| 82 | */ | 82 | */ |
| 83 | EmulatedConsole(); | 83 | EmulatedConsole(); |
| 84 | ~EmulatedConsole(); | 84 | ~EmulatedConsole(); |
| @@ -89,14 +89,16 @@ public: | |||
| 89 | /// Removes all callbacks created from input devices | 89 | /// Removes all callbacks created from input devices |
| 90 | void UnloadInput(); | 90 | void UnloadInput(); |
| 91 | 91 | ||
| 92 | /// Sets the emulated console into configuring mode. Locking all HID service events from being | 92 | /** |
| 93 | /// moddified | 93 | * Sets the emulated console into configuring mode |
| 94 | * This prevents the modification of the HID state of the emulated console by input commands | ||
| 95 | */ | ||
| 94 | void EnableConfiguration(); | 96 | void EnableConfiguration(); |
| 95 | 97 | ||
| 96 | /// Returns the emulated console to the normal behaivour | 98 | /// Returns the emulated console into normal mode, allowing the modification of the HID state |
| 97 | void DisableConfiguration(); | 99 | void DisableConfiguration(); |
| 98 | 100 | ||
| 99 | /// Returns true if the emulated console is on configuring mode | 101 | /// Returns true if the emulated console is in configuring mode |
| 100 | bool IsConfiguring() const; | 102 | bool IsConfiguring() const; |
| 101 | 103 | ||
| 102 | /// Reload all input devices | 104 | /// Reload all input devices |
| @@ -116,7 +118,7 @@ public: | |||
| 116 | 118 | ||
| 117 | /** | 119 | /** |
| 118 | * Updates the current mapped motion device | 120 | * Updates the current mapped motion device |
| 119 | * @param ParamPackage with controller data to be mapped | 121 | * @param param ParamPackage with controller data to be mapped |
| 120 | */ | 122 | */ |
| 121 | void SetMotionParam(Common::ParamPackage param); | 123 | void SetMotionParam(Common::ParamPackage param); |
| 122 | 124 | ||
| @@ -134,14 +136,14 @@ public: | |||
| 134 | 136 | ||
| 135 | /** | 137 | /** |
| 136 | * Adds a callback to the list of events | 138 | * Adds a callback to the list of events |
| 137 | * @param ConsoleUpdateCallback that will be triggered | 139 | * @param update_callback A ConsoleUpdateCallback that will be triggered |
| 138 | * @return an unique key corresponding to the callback index in the list | 140 | * @return an unique key corresponding to the callback index in the list |
| 139 | */ | 141 | */ |
| 140 | int SetCallback(ConsoleUpdateCallback update_callback); | 142 | int SetCallback(ConsoleUpdateCallback update_callback); |
| 141 | 143 | ||
| 142 | /** | 144 | /** |
| 143 | * Removes a callback from the list stopping any future events to this object | 145 | * Removes a callback from the list stopping any future events to this object |
| 144 | * @param Key corresponding to the callback index in the list | 146 | * @param key Key corresponding to the callback index in the list |
| 145 | */ | 147 | */ |
| 146 | void DeleteCallback(int key); | 148 | void DeleteCallback(int key); |
| 147 | 149 | ||
| @@ -151,20 +153,20 @@ private: | |||
| 151 | 153 | ||
| 152 | /** | 154 | /** |
| 153 | * Updates the motion status of the console | 155 | * Updates the motion status of the console |
| 154 | * @param A CallbackStatus containing gyro and accelerometer data | 156 | * @param callback A CallbackStatus containing gyro and accelerometer data |
| 155 | */ | 157 | */ |
| 156 | void SetMotion(Common::Input::CallbackStatus callback); | 158 | void SetMotion(Common::Input::CallbackStatus callback); |
| 157 | 159 | ||
| 158 | /** | 160 | /** |
| 159 | * Updates the touch status of the console | 161 | * Updates the touch status of the console |
| 160 | * @param callback: A CallbackStatus containing the touch position | 162 | * @param callback A CallbackStatus containing the touch position |
| 161 | * @param index: Finger ID to be updated | 163 | * @param index Finger ID to be updated |
| 162 | */ | 164 | */ |
| 163 | void SetTouch(Common::Input::CallbackStatus callback, std::size_t index); | 165 | void SetTouch(Common::Input::CallbackStatus callback, std::size_t index); |
| 164 | 166 | ||
| 165 | /** | 167 | /** |
| 166 | * Triggers a callback that something has changed on the console status | 168 | * Triggers a callback that something has changed on the console status |
| 167 | * @param Input type of the event to trigger | 169 | * @param type Input type of the event to trigger |
| 168 | */ | 170 | */ |
| 169 | void TriggerOnChange(ConsoleTriggerType type); | 171 | void TriggerOnChange(ConsoleTriggerType type); |
| 170 | 172 | ||
diff --git a/src/core/hid/emulated_controller.h b/src/core/hid/emulated_controller.h index 2c5d51bc8..5887e3e38 100644 --- a/src/core/hid/emulated_controller.h +++ b/src/core/hid/emulated_controller.h | |||
| @@ -132,8 +132,8 @@ struct ControllerUpdateCallback { | |||
| 132 | class EmulatedController { | 132 | class EmulatedController { |
| 133 | public: | 133 | public: |
| 134 | /** | 134 | /** |
| 135 | * Contains all input data related to this controller. Like buttons, joysticks, motion. | 135 | * Contains all input data (buttons, joysticks, vibration, and motion) within this controller. |
| 136 | * @param Npad id type for this specific controller | 136 | * @param npad_id_type npad id type for this specific controller |
| 137 | */ | 137 | */ |
| 138 | explicit EmulatedController(NpadIdType npad_id_type_); | 138 | explicit EmulatedController(NpadIdType npad_id_type_); |
| 139 | ~EmulatedController(); | 139 | ~EmulatedController(); |
| @@ -155,7 +155,7 @@ public: | |||
| 155 | 155 | ||
| 156 | /** | 156 | /** |
| 157 | * Gets the NpadStyleIndex for this controller | 157 | * Gets the NpadStyleIndex for this controller |
| 158 | * @param If true tmp_npad_type will be returned | 158 | * @param get_temporary_value If true tmp_npad_type will be returned |
| 159 | * @return NpadStyleIndex set on the controller | 159 | * @return NpadStyleIndex set on the controller |
| 160 | */ | 160 | */ |
| 161 | NpadStyleIndex GetNpadStyleIndex(bool get_temporary_value = false) const; | 161 | NpadStyleIndex GetNpadStyleIndex(bool get_temporary_value = false) const; |
| @@ -168,7 +168,7 @@ public: | |||
| 168 | 168 | ||
| 169 | /** | 169 | /** |
| 170 | * Is the emulated connected | 170 | * Is the emulated connected |
| 171 | * @param If true tmp_is_connected will be returned | 171 | * @param get_temporary_value If true tmp_is_connected will be returned |
| 172 | * @return true if the controller has the connected status | 172 | * @return true if the controller has the connected status |
| 173 | */ | 173 | */ |
| 174 | bool IsConnected(bool get_temporary_value = false) const; | 174 | bool IsConnected(bool get_temporary_value = false) const; |
| @@ -179,14 +179,16 @@ public: | |||
| 179 | /// Removes all callbacks created from input devices | 179 | /// Removes all callbacks created from input devices |
| 180 | void UnloadInput(); | 180 | void UnloadInput(); |
| 181 | 181 | ||
| 182 | /// Sets the emulated console into configuring mode. Locking all HID service events from being | 182 | /** |
| 183 | /// moddified | 183 | * Sets the emulated controller into configuring mode |
| 184 | * This prevents the modification of the HID state of the emulated controller by input commands | ||
| 185 | */ | ||
| 184 | void EnableConfiguration(); | 186 | void EnableConfiguration(); |
| 185 | 187 | ||
| 186 | /// Returns the emulated console to the normal behaivour | 188 | /// Returns the emulated controller into normal mode, allowing the modification of the HID state |
| 187 | void DisableConfiguration(); | 189 | void DisableConfiguration(); |
| 188 | 190 | ||
| 189 | /// Returns true if the emulated device is on configuring mode | 191 | /// Returns true if the emulated controller is in configuring mode |
| 190 | bool IsConfiguring() const; | 192 | bool IsConfiguring() const; |
| 191 | 193 | ||
| 192 | /// Reload all input devices | 194 | /// Reload all input devices |
| @@ -215,19 +217,19 @@ public: | |||
| 215 | 217 | ||
| 216 | /** | 218 | /** |
| 217 | * Updates the current mapped button device | 219 | * Updates the current mapped button device |
| 218 | * @param ParamPackage with controller data to be mapped | 220 | * @param param ParamPackage with controller data to be mapped |
| 219 | */ | 221 | */ |
| 220 | void SetButtonParam(std::size_t index, Common::ParamPackage param); | 222 | void SetButtonParam(std::size_t index, Common::ParamPackage param); |
| 221 | 223 | ||
| 222 | /** | 224 | /** |
| 223 | * Updates the current mapped stick device | 225 | * Updates the current mapped stick device |
| 224 | * @param ParamPackage with controller data to be mapped | 226 | * @param param ParamPackage with controller data to be mapped |
| 225 | */ | 227 | */ |
| 226 | void SetStickParam(std::size_t index, Common::ParamPackage param); | 228 | void SetStickParam(std::size_t index, Common::ParamPackage param); |
| 227 | 229 | ||
| 228 | /** | 230 | /** |
| 229 | * Updates the current mapped motion device | 231 | * Updates the current mapped motion device |
| 230 | * @param ParamPackage with controller data to be mapped | 232 | * @param param ParamPackage with controller data to be mapped |
| 231 | */ | 233 | */ |
| 232 | void SetMotionParam(std::size_t index, Common::ParamPackage param); | 234 | void SetMotionParam(std::size_t index, Common::ParamPackage param); |
| 233 | 235 | ||
| @@ -270,13 +272,13 @@ public: | |||
| 270 | /// Returns the latest battery status from the controller | 272 | /// Returns the latest battery status from the controller |
| 271 | BatteryLevelState GetBattery() const; | 273 | BatteryLevelState GetBattery() const; |
| 272 | 274 | ||
| 273 | /* | 275 | /** |
| 274 | * Sends a specific vibration to the output device | 276 | * Sends a specific vibration to the output device |
| 275 | * @return returns true if vibration had no errors | 277 | * @return returns true if vibration had no errors |
| 276 | */ | 278 | */ |
| 277 | bool SetVibration(std::size_t device_index, VibrationValue vibration); | 279 | bool SetVibration(std::size_t device_index, VibrationValue vibration); |
| 278 | 280 | ||
| 279 | /* | 281 | /** |
| 280 | * Sends a small vibration to the output device | 282 | * Sends a small vibration to the output device |
| 281 | * @return returns true if SetVibration was successfull | 283 | * @return returns true if SetVibration was successfull |
| 282 | */ | 284 | */ |
| @@ -290,14 +292,14 @@ public: | |||
| 290 | 292 | ||
| 291 | /** | 293 | /** |
| 292 | * Adds a callback to the list of events | 294 | * Adds a callback to the list of events |
| 293 | * @param ConsoleUpdateCallback that will be triggered | 295 | * @param update_callback A ConsoleUpdateCallback that will be triggered |
| 294 | * @return an unique key corresponding to the callback index in the list | 296 | * @return an unique key corresponding to the callback index in the list |
| 295 | */ | 297 | */ |
| 296 | int SetCallback(ControllerUpdateCallback update_callback); | 298 | int SetCallback(ControllerUpdateCallback update_callback); |
| 297 | 299 | ||
| 298 | /** | 300 | /** |
| 299 | * Removes a callback from the list stopping any future events to this object | 301 | * Removes a callback from the list stopping any future events to this object |
| 300 | * @param Key corresponding to the callback index in the list | 302 | * @param key Key corresponding to the callback index in the list |
| 301 | */ | 303 | */ |
| 302 | void DeleteCallback(int key); | 304 | void DeleteCallback(int key); |
| 303 | 305 | ||
| @@ -310,43 +312,43 @@ private: | |||
| 310 | 312 | ||
| 311 | /** | 313 | /** |
| 312 | * Updates the button status of the controller | 314 | * Updates the button status of the controller |
| 313 | * @param callback: A CallbackStatus containing the button status | 315 | * @param callback A CallbackStatus containing the button status |
| 314 | * @param index: Button ID of the to be updated | 316 | * @param index Button ID of the to be updated |
| 315 | */ | 317 | */ |
| 316 | void SetButton(Common::Input::CallbackStatus callback, std::size_t index, Common::UUID uuid); | 318 | void SetButton(Common::Input::CallbackStatus callback, std::size_t index, Common::UUID uuid); |
| 317 | 319 | ||
| 318 | /** | 320 | /** |
| 319 | * Updates the analog stick status of the controller | 321 | * Updates the analog stick status of the controller |
| 320 | * @param callback: A CallbackStatus containing the analog stick status | 322 | * @param callback A CallbackStatus containing the analog stick status |
| 321 | * @param index: stick ID of the to be updated | 323 | * @param index stick ID of the to be updated |
| 322 | */ | 324 | */ |
| 323 | void SetStick(Common::Input::CallbackStatus callback, std::size_t index, Common::UUID uuid); | 325 | void SetStick(Common::Input::CallbackStatus callback, std::size_t index, Common::UUID uuid); |
| 324 | 326 | ||
| 325 | /** | 327 | /** |
| 326 | * Updates the trigger status of the controller | 328 | * Updates the trigger status of the controller |
| 327 | * @param callback: A CallbackStatus containing the trigger status | 329 | * @param callback A CallbackStatus containing the trigger status |
| 328 | * @param index: trigger ID of the to be updated | 330 | * @param index trigger ID of the to be updated |
| 329 | */ | 331 | */ |
| 330 | void SetTrigger(Common::Input::CallbackStatus callback, std::size_t index, Common::UUID uuid); | 332 | void SetTrigger(Common::Input::CallbackStatus callback, std::size_t index, Common::UUID uuid); |
| 331 | 333 | ||
| 332 | /** | 334 | /** |
| 333 | * Updates the motion status of the controller | 335 | * Updates the motion status of the controller |
| 334 | * @param callback: A CallbackStatus containing gyro and accelerometer data | 336 | * @param callback A CallbackStatus containing gyro and accelerometer data |
| 335 | * @param index: motion ID of the to be updated | 337 | * @param index motion ID of the to be updated |
| 336 | */ | 338 | */ |
| 337 | void SetMotion(Common::Input::CallbackStatus callback, std::size_t index); | 339 | void SetMotion(Common::Input::CallbackStatus callback, std::size_t index); |
| 338 | 340 | ||
| 339 | /** | 341 | /** |
| 340 | * Updates the battery status of the controller | 342 | * Updates the battery status of the controller |
| 341 | * @param callback: A CallbackStatus containing the battery status | 343 | * @param callback A CallbackStatus containing the battery status |
| 342 | * @param index: Button ID of the to be updated | 344 | * @param index Button ID of the to be updated |
| 343 | */ | 345 | */ |
| 344 | void SetBattery(Common::Input::CallbackStatus callback, std::size_t index); | 346 | void SetBattery(Common::Input::CallbackStatus callback, std::size_t index); |
| 345 | 347 | ||
| 346 | /** | 348 | /** |
| 347 | * Triggers a callback that something has changed on the controller status | 349 | * Triggers a callback that something has changed on the controller status |
| 348 | * @param type: Input type of the event to trigger | 350 | * @param type Input type of the event to trigger |
| 349 | * @param is_service_update: indicates if this event should be sended to only services | 351 | * @param is_service_update indicates if this event should only be sent to HID services |
| 350 | */ | 352 | */ |
| 351 | void TriggerOnChange(ControllerTriggerType type, bool is_service_update); | 353 | void TriggerOnChange(ControllerTriggerType type, bool is_service_update); |
| 352 | 354 | ||
| @@ -357,7 +359,7 @@ private: | |||
| 357 | f32 motion_sensitivity{0.01f}; | 359 | f32 motion_sensitivity{0.01f}; |
| 358 | bool force_update_motion{false}; | 360 | bool force_update_motion{false}; |
| 359 | 361 | ||
| 360 | // Temporary values to avoid doing changes while the controller is on configuration mode | 362 | // Temporary values to avoid doing changes while the controller is in configuring mode |
| 361 | NpadStyleIndex tmp_npad_type{NpadStyleIndex::None}; | 363 | NpadStyleIndex tmp_npad_type{NpadStyleIndex::None}; |
| 362 | bool tmp_is_connected{false}; | 364 | bool tmp_is_connected{false}; |
| 363 | 365 | ||
diff --git a/src/core/hid/emulated_devices.h b/src/core/hid/emulated_devices.h index 05a945d08..d4f457651 100644 --- a/src/core/hid/emulated_devices.h +++ b/src/core/hid/emulated_devices.h | |||
| @@ -75,7 +75,7 @@ class EmulatedDevices { | |||
| 75 | public: | 75 | public: |
| 76 | /** | 76 | /** |
| 77 | * Contains all input data related to external devices that aren't necesarily a controller | 77 | * Contains all input data related to external devices that aren't necesarily a controller |
| 78 | * like keyboard and mouse | 78 | * This includes devices such as the keyboard or mouse |
| 79 | */ | 79 | */ |
| 80 | EmulatedDevices(); | 80 | EmulatedDevices(); |
| 81 | ~EmulatedDevices(); | 81 | ~EmulatedDevices(); |
| @@ -86,14 +86,16 @@ public: | |||
| 86 | /// Removes all callbacks created from input devices | 86 | /// Removes all callbacks created from input devices |
| 87 | void UnloadInput(); | 87 | void UnloadInput(); |
| 88 | 88 | ||
| 89 | /// Sets the emulated console into configuring mode. Locking all HID service events from being | 89 | /** |
| 90 | /// moddified | 90 | * Sets the emulated devices into configuring mode |
| 91 | * This prevents the modification of the HID state of the emulated devices by input commands | ||
| 92 | */ | ||
| 91 | void EnableConfiguration(); | 93 | void EnableConfiguration(); |
| 92 | 94 | ||
| 93 | /// Returns the emulated console to the normal behaivour | 95 | /// Returns the emulated devices into normal mode, allowing the modification of the HID state |
| 94 | void DisableConfiguration(); | 96 | void DisableConfiguration(); |
| 95 | 97 | ||
| 96 | /// Returns true if the emulated device is on configuring mode | 98 | /// Returns true if the emulated device is in configuring mode |
| 97 | bool IsConfiguring() const; | 99 | bool IsConfiguring() const; |
| 98 | 100 | ||
| 99 | /// Reload all input devices | 101 | /// Reload all input devices |
| @@ -134,14 +136,14 @@ public: | |||
| 134 | 136 | ||
| 135 | /** | 137 | /** |
| 136 | * Adds a callback to the list of events | 138 | * Adds a callback to the list of events |
| 137 | * @param InterfaceUpdateCallback that will be triggered | 139 | * @param update_callback InterfaceUpdateCallback that will be triggered |
| 138 | * @return an unique key corresponding to the callback index in the list | 140 | * @return an unique key corresponding to the callback index in the list |
| 139 | */ | 141 | */ |
| 140 | int SetCallback(InterfaceUpdateCallback update_callback); | 142 | int SetCallback(InterfaceUpdateCallback update_callback); |
| 141 | 143 | ||
| 142 | /** | 144 | /** |
| 143 | * Removes a callback from the list stopping any future events to this object | 145 | * Removes a callback from the list stopping any future events to this object |
| 144 | * @param Key corresponding to the callback index in the list | 146 | * @param key Key corresponding to the callback index in the list |
| 145 | */ | 147 | */ |
| 146 | void DeleteCallback(int key); | 148 | void DeleteCallback(int key); |
| 147 | 149 | ||
| @@ -151,42 +153,42 @@ private: | |||
| 151 | 153 | ||
| 152 | /** | 154 | /** |
| 153 | * Updates the touch status of the keyboard device | 155 | * Updates the touch status of the keyboard device |
| 154 | * @param callback: A CallbackStatus containing the key status | 156 | * @param callback A CallbackStatus containing the key status |
| 155 | * @param index: key ID to be updated | 157 | * @param index key ID to be updated |
| 156 | */ | 158 | */ |
| 157 | void SetKeyboardButton(Common::Input::CallbackStatus callback, std::size_t index); | 159 | void SetKeyboardButton(Common::Input::CallbackStatus callback, std::size_t index); |
| 158 | 160 | ||
| 159 | /** | 161 | /** |
| 160 | * Updates the keyboard status of the keyboard device | 162 | * Updates the keyboard status of the keyboard device |
| 161 | * @param callback: A CallbackStatus containing the modifier key status | 163 | * @param callback A CallbackStatus containing the modifier key status |
| 162 | * @param index: modifier key ID to be updated | 164 | * @param index modifier key ID to be updated |
| 163 | */ | 165 | */ |
| 164 | void SetKeyboardModifier(Common::Input::CallbackStatus callback, std::size_t index); | 166 | void SetKeyboardModifier(Common::Input::CallbackStatus callback, std::size_t index); |
| 165 | 167 | ||
| 166 | /** | 168 | /** |
| 167 | * Updates the mouse button status of the mouse device | 169 | * Updates the mouse button status of the mouse device |
| 168 | * @param callback: A CallbackStatus containing the button status | 170 | * @param callback A CallbackStatus containing the button status |
| 169 | * @param index: Button ID to be updated | 171 | * @param index Button ID to be updated |
| 170 | */ | 172 | */ |
| 171 | void SetMouseButton(Common::Input::CallbackStatus callback, std::size_t index); | 173 | void SetMouseButton(Common::Input::CallbackStatus callback, std::size_t index); |
| 172 | 174 | ||
| 173 | /** | 175 | /** |
| 174 | * Updates the mouse wheel status of the mouse device | 176 | * Updates the mouse wheel status of the mouse device |
| 175 | * @param callback: A CallbackStatus containing the wheel status | 177 | * @param callback A CallbackStatus containing the wheel status |
| 176 | * @param index: wheel ID to be updated | 178 | * @param index wheel ID to be updated |
| 177 | */ | 179 | */ |
| 178 | void SetMouseAnalog(Common::Input::CallbackStatus callback, std::size_t index); | 180 | void SetMouseAnalog(Common::Input::CallbackStatus callback, std::size_t index); |
| 179 | 181 | ||
| 180 | /** | 182 | /** |
| 181 | * Updates the mouse position status of the mouse device | 183 | * Updates the mouse position status of the mouse device |
| 182 | * @param callback: A CallbackStatus containing the position status | 184 | * @param callback A CallbackStatus containing the position status |
| 183 | * @param index: stick ID to be updated | 185 | * @param index stick ID to be updated |
| 184 | */ | 186 | */ |
| 185 | void SetMouseStick(Common::Input::CallbackStatus callback); | 187 | void SetMouseStick(Common::Input::CallbackStatus callback); |
| 186 | 188 | ||
| 187 | /** | 189 | /** |
| 188 | * Triggers a callback that something has changed on the device status | 190 | * Triggers a callback that something has changed on the device status |
| 189 | * @param Input type of the event to trigger | 191 | * @param type Input type of the event to trigger |
| 190 | */ | 192 | */ |
| 191 | void TriggerOnChange(DeviceTriggerType type); | 193 | void TriggerOnChange(DeviceTriggerType type); |
| 192 | 194 | ||
diff --git a/src/core/hid/input_converter.h b/src/core/hid/input_converter.h index 1492489d7..d24582226 100644 --- a/src/core/hid/input_converter.h +++ b/src/core/hid/input_converter.h | |||
| @@ -21,7 +21,7 @@ namespace Core::HID { | |||
| 21 | /** | 21 | /** |
| 22 | * Converts raw input data into a valid battery status. | 22 | * Converts raw input data into a valid battery status. |
| 23 | * | 23 | * |
| 24 | * @param Supported callbacks: Analog, Battery, Trigger. | 24 | * @param callback Supported callbacks: Analog, Battery, Trigger. |
| 25 | * @return A valid BatteryStatus object. | 25 | * @return A valid BatteryStatus object. |
| 26 | */ | 26 | */ |
| 27 | Common::Input::BatteryStatus TransformToBattery(const Common::Input::CallbackStatus& callback); | 27 | Common::Input::BatteryStatus TransformToBattery(const Common::Input::CallbackStatus& callback); |
| @@ -29,7 +29,7 @@ Common::Input::BatteryStatus TransformToBattery(const Common::Input::CallbackSta | |||
| 29 | /** | 29 | /** |
| 30 | * Converts raw input data into a valid button status. Applies invert properties to the output. | 30 | * Converts raw input data into a valid button status. Applies invert properties to the output. |
| 31 | * | 31 | * |
| 32 | * @param Supported callbacks: Analog, Button, Trigger. | 32 | * @param callback Supported callbacks: Analog, Button, Trigger. |
| 33 | * @return A valid TouchStatus object. | 33 | * @return A valid TouchStatus object. |
| 34 | */ | 34 | */ |
| 35 | Common::Input::ButtonStatus TransformToButton(const Common::Input::CallbackStatus& callback); | 35 | Common::Input::ButtonStatus TransformToButton(const Common::Input::CallbackStatus& callback); |
| @@ -37,7 +37,7 @@ Common::Input::ButtonStatus TransformToButton(const Common::Input::CallbackStatu | |||
| 37 | /** | 37 | /** |
| 38 | * Converts raw input data into a valid motion status. | 38 | * Converts raw input data into a valid motion status. |
| 39 | * | 39 | * |
| 40 | * @param Supported callbacks: Motion. | 40 | * @param callback Supported callbacks: Motion. |
| 41 | * @return A valid TouchStatus object. | 41 | * @return A valid TouchStatus object. |
| 42 | */ | 42 | */ |
| 43 | Common::Input::MotionStatus TransformToMotion(const Common::Input::CallbackStatus& callback); | 43 | Common::Input::MotionStatus TransformToMotion(const Common::Input::CallbackStatus& callback); |
| @@ -46,7 +46,7 @@ Common::Input::MotionStatus TransformToMotion(const Common::Input::CallbackStatu | |||
| 46 | * Converts raw input data into a valid stick status. Applies offset, deadzone, range and invert | 46 | * Converts raw input data into a valid stick status. Applies offset, deadzone, range and invert |
| 47 | * properties to the output. | 47 | * properties to the output. |
| 48 | * | 48 | * |
| 49 | * @param Supported callbacks: Stick. | 49 | * @param callback Supported callbacks: Stick. |
| 50 | * @return A valid StickStatus object. | 50 | * @return A valid StickStatus object. |
| 51 | */ | 51 | */ |
| 52 | Common::Input::StickStatus TransformToStick(const Common::Input::CallbackStatus& callback); | 52 | Common::Input::StickStatus TransformToStick(const Common::Input::CallbackStatus& callback); |
| @@ -54,7 +54,7 @@ Common::Input::StickStatus TransformToStick(const Common::Input::CallbackStatus& | |||
| 54 | /** | 54 | /** |
| 55 | * Converts raw input data into a valid touch status. | 55 | * Converts raw input data into a valid touch status. |
| 56 | * | 56 | * |
| 57 | * @param Supported callbacks: Touch. | 57 | * @param callback Supported callbacks: Touch. |
| 58 | * @return A valid TouchStatus object. | 58 | * @return A valid TouchStatus object. |
| 59 | */ | 59 | */ |
| 60 | Common::Input::TouchStatus TransformToTouch(const Common::Input::CallbackStatus& callback); | 60 | Common::Input::TouchStatus TransformToTouch(const Common::Input::CallbackStatus& callback); |
| @@ -63,7 +63,7 @@ Common::Input::TouchStatus TransformToTouch(const Common::Input::CallbackStatus& | |||
| 63 | * Converts raw input data into a valid trigger status. Applies offset, deadzone, range and | 63 | * Converts raw input data into a valid trigger status. Applies offset, deadzone, range and |
| 64 | * invert properties to the output. Button status uses the threshold property if necessary. | 64 | * invert properties to the output. Button status uses the threshold property if necessary. |
| 65 | * | 65 | * |
| 66 | * @param Supported callbacks: Analog, Button, Trigger. | 66 | * @param callback Supported callbacks: Analog, Button, Trigger. |
| 67 | * @return A valid TriggerStatus object. | 67 | * @return A valid TriggerStatus object. |
| 68 | */ | 68 | */ |
| 69 | Common::Input::TriggerStatus TransformToTrigger(const Common::Input::CallbackStatus& callback); | 69 | Common::Input::TriggerStatus TransformToTrigger(const Common::Input::CallbackStatus& callback); |
| @@ -72,22 +72,23 @@ Common::Input::TriggerStatus TransformToTrigger(const Common::Input::CallbackSta | |||
| 72 | * Converts raw input data into a valid analog status. Applies offset, deadzone, range and | 72 | * Converts raw input data into a valid analog status. Applies offset, deadzone, range and |
| 73 | * invert properties to the output. | 73 | * invert properties to the output. |
| 74 | * | 74 | * |
| 75 | * @param Supported callbacks: Analog. | 75 | * @param callback Supported callbacks: Analog. |
| 76 | * @return A valid AnalogStatus object. | 76 | * @return A valid AnalogStatus object. |
| 77 | */ | 77 | */ |
| 78 | Common::Input::AnalogStatus TransformToAnalog(const Common::Input::CallbackStatus& callback); | 78 | Common::Input::AnalogStatus TransformToAnalog(const Common::Input::CallbackStatus& callback); |
| 79 | 79 | ||
| 80 | /** | 80 | /** |
| 81 | * Converts raw analog data into a valid analog value | 81 | * Converts raw analog data into a valid analog value |
| 82 | * @param An analog object containing raw data and properties, bool that determines if the value | 82 | * @param analog An analog object containing raw data and properties |
| 83 | * needs to be clamped between -1.0f and 1.0f. | 83 | * @param clamp_value determines if the value needs to be clamped between -1.0f and 1.0f. |
| 84 | */ | 84 | */ |
| 85 | void SanitizeAnalog(Common::Input::AnalogStatus& analog, bool clamp_value); | 85 | void SanitizeAnalog(Common::Input::AnalogStatus& analog, bool clamp_value); |
| 86 | 86 | ||
| 87 | /** | 87 | /** |
| 88 | * Converts raw stick data into a valid stick value | 88 | * Converts raw stick data into a valid stick value |
| 89 | * @param Two analog objects containing raw data and properties, bool that determines if the value | 89 | * @param analog_x raw analog data and properties for the x-axis |
| 90 | * needs to be clamped into the unit circle. | 90 | * @param analog_y raw analog data and properties for the y-axis |
| 91 | * @param clamp_value bool that determines if the value needs to be clamped into the unit circle. | ||
| 91 | */ | 92 | */ |
| 92 | void SanitizeStick(Common::Input::AnalogStatus& analog_x, Common::Input::AnalogStatus& analog_y, | 93 | void SanitizeStick(Common::Input::AnalogStatus& analog_x, Common::Input::AnalogStatus& analog_y, |
| 93 | bool clamp_value); | 94 | bool clamp_value); |