diff options
| author | 2021-10-30 22:23:10 -0500 | |
|---|---|---|
| committer | 2021-11-24 20:30:26 -0600 | |
| commit | 2b1b0c2a30e242b08ec120e09803ec54d5445703 (patch) | |
| tree | 9a10400a7e4403b288eee3aae8a52f1d5be912de /src/core/hid/input_converter.h | |
| parent | input_common: Revert deleted TAS functions (diff) | |
| download | yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.tar.gz yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.tar.xz yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.zip | |
kraken: Address comments from review
start lion review
Diffstat (limited to 'src/core/hid/input_converter.h')
| -rw-r--r-- | src/core/hid/input_converter.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/hid/input_converter.h b/src/core/hid/input_converter.h index 3cc32e26a..b38e657b0 100644 --- a/src/core/hid/input_converter.h +++ b/src/core/hid/input_converter.h | |||
| @@ -16,7 +16,7 @@ namespace Core::HID { | |||
| 16 | * @param Supported callbacks: Analog, Battery, Trigger. | 16 | * @param Supported callbacks: Analog, Battery, Trigger. |
| 17 | * @return A valid BatteryStatus object. | 17 | * @return A valid BatteryStatus object. |
| 18 | */ | 18 | */ |
| 19 | Input::BatteryStatus TransformToBattery(const Input::CallbackStatus& callback); | 19 | Common::Input::BatteryStatus TransformToBattery(const Common::Input::CallbackStatus& callback); |
| 20 | 20 | ||
| 21 | /** | 21 | /** |
| 22 | * Converts raw input data into a valid button status. Applies invert properties to the output. | 22 | * Converts raw input data into a valid button status. Applies invert properties to the output. |
| @@ -24,7 +24,7 @@ Input::BatteryStatus TransformToBattery(const Input::CallbackStatus& callback); | |||
| 24 | * @param Supported callbacks: Analog, Button, Trigger. | 24 | * @param Supported callbacks: Analog, Button, Trigger. |
| 25 | * @return A valid TouchStatus object. | 25 | * @return A valid TouchStatus object. |
| 26 | */ | 26 | */ |
| 27 | Input::ButtonStatus TransformToButton(const Input::CallbackStatus& callback); | 27 | Common::Input::ButtonStatus TransformToButton(const Common::Input::CallbackStatus& callback); |
| 28 | 28 | ||
| 29 | /** | 29 | /** |
| 30 | * Converts raw input data into a valid motion status. | 30 | * Converts raw input data into a valid motion status. |
| @@ -32,7 +32,7 @@ Input::ButtonStatus TransformToButton(const Input::CallbackStatus& callback); | |||
| 32 | * @param Supported callbacks: Motion. | 32 | * @param Supported callbacks: Motion. |
| 33 | * @return A valid TouchStatus object. | 33 | * @return A valid TouchStatus object. |
| 34 | */ | 34 | */ |
| 35 | Input::MotionStatus TransformToMotion(const Input::CallbackStatus& callback); | 35 | Common::Input::MotionStatus TransformToMotion(const Common::Input::CallbackStatus& callback); |
| 36 | 36 | ||
| 37 | /** | 37 | /** |
| 38 | * Converts raw input data into a valid stick status. Applies offset, deadzone, range and invert | 38 | * Converts raw input data into a valid stick status. Applies offset, deadzone, range and invert |
| @@ -41,7 +41,7 @@ Input::MotionStatus TransformToMotion(const Input::CallbackStatus& callback); | |||
| 41 | * @param Supported callbacks: Stick. | 41 | * @param Supported callbacks: Stick. |
| 42 | * @return A valid StickStatus object. | 42 | * @return A valid StickStatus object. |
| 43 | */ | 43 | */ |
| 44 | Input::StickStatus TransformToStick(const Input::CallbackStatus& callback); | 44 | Common::Input::StickStatus TransformToStick(const Common::Input::CallbackStatus& callback); |
| 45 | 45 | ||
| 46 | /** | 46 | /** |
| 47 | * Converts raw input data into a valid touch status. | 47 | * Converts raw input data into a valid touch status. |
| @@ -49,7 +49,7 @@ Input::StickStatus TransformToStick(const Input::CallbackStatus& callback); | |||
| 49 | * @param Supported callbacks: Touch. | 49 | * @param Supported callbacks: Touch. |
| 50 | * @return A valid TouchStatus object. | 50 | * @return A valid TouchStatus object. |
| 51 | */ | 51 | */ |
| 52 | Input::TouchStatus TransformToTouch(const Input::CallbackStatus& callback); | 52 | Common::Input::TouchStatus TransformToTouch(const Common::Input::CallbackStatus& callback); |
| 53 | 53 | ||
| 54 | /** | 54 | /** |
| 55 | * Converts raw input data into a valid trigger status. Applies offset, deadzone, range and | 55 | * Converts raw input data into a valid trigger status. Applies offset, deadzone, range and |
| @@ -58,20 +58,21 @@ Input::TouchStatus TransformToTouch(const Input::CallbackStatus& callback); | |||
| 58 | * @param Supported callbacks: Analog, Button, Trigger. | 58 | * @param Supported callbacks: Analog, Button, Trigger. |
| 59 | * @return A valid TriggerStatus object. | 59 | * @return A valid TriggerStatus object. |
| 60 | */ | 60 | */ |
| 61 | Input::TriggerStatus TransformToTrigger(const Input::CallbackStatus& callback); | 61 | Common::Input::TriggerStatus TransformToTrigger(const Common::Input::CallbackStatus& callback); |
| 62 | 62 | ||
| 63 | /** | 63 | /** |
| 64 | * Converts raw analog data into a valid analog value | 64 | * Converts raw analog data into a valid analog value |
| 65 | * @param An analog object containing raw data and properties, bool that determines if the value | 65 | * @param An analog object containing raw data and properties, bool that determines if the value |
| 66 | * needs to be clamped between -1.0f and 1.0f. | 66 | * needs to be clamped between -1.0f and 1.0f. |
| 67 | */ | 67 | */ |
| 68 | void SanitizeAnalog(Input::AnalogStatus& analog, bool clamp_value); | 68 | void SanitizeAnalog(Common::Input::AnalogStatus& analog, bool clamp_value); |
| 69 | 69 | ||
| 70 | /** | 70 | /** |
| 71 | * Converts raw stick data into a valid stick value | 71 | * Converts raw stick data into a valid stick value |
| 72 | * @param Two analog objects containing raw data and properties, bool that determines if the value | 72 | * @param Two analog objects containing raw data and properties, bool that determines if the value |
| 73 | * needs to be clamped into the unit circle. | 73 | * needs to be clamped into the unit circle. |
| 74 | */ | 74 | */ |
| 75 | void SanitizeStick(Input::AnalogStatus& analog_x, Input::AnalogStatus& analog_y, bool clamp_value); | 75 | void SanitizeStick(Common::Input::AnalogStatus& analog_x, Common::Input::AnalogStatus& analog_y, |
| 76 | bool clamp_value); | ||
| 76 | 77 | ||
| 77 | } // namespace Core::HID | 78 | } // namespace Core::HID |