diff options
| author | 2023-03-11 22:10:38 -0500 | |
|---|---|---|
| committer | 2023-03-12 11:33:01 -0400 | |
| commit | 600f325d87e42f856da58c42a5280f098ebb6e8c (patch) | |
| tree | 75c4fe48af55186a4e420e94a1d7e1bfd92e4ec0 /src/input_common | |
| parent | general: use codespell to identify spelling mistakes (diff) | |
| download | yuzu-600f325d87e42f856da58c42a5280f098ebb6e8c.tar.gz yuzu-600f325d87e42f856da58c42a5280f098ebb6e8c.tar.xz yuzu-600f325d87e42f856da58c42a5280f098ebb6e8c.zip | |
general: fix spelling mistakes
Diffstat (limited to 'src/input_common')
| -rw-r--r-- | src/input_common/drivers/gc_adapter.cpp | 2 | ||||
| -rw-r--r-- | src/input_common/drivers/joycon.h | 2 | ||||
| -rw-r--r-- | src/input_common/drivers/keyboard.cpp | 2 | ||||
| -rw-r--r-- | src/input_common/drivers/mouse.cpp | 4 | ||||
| -rw-r--r-- | src/input_common/drivers/sdl_driver.cpp | 4 | ||||
| -rw-r--r-- | src/input_common/drivers/virtual_amiibo.cpp | 2 | ||||
| -rw-r--r-- | src/input_common/helpers/joycon_driver.cpp | 4 | ||||
| -rw-r--r-- | src/input_common/helpers/joycon_driver.h | 4 | ||||
| -rw-r--r-- | src/input_common/helpers/joycon_protocol/common_protocol.h | 4 | ||||
| -rw-r--r-- | src/input_common/helpers/udp_protocol.cpp | 2 | ||||
| -rw-r--r-- | src/input_common/main.h | 2 |
11 files changed, 16 insertions, 16 deletions
diff --git a/src/input_common/drivers/gc_adapter.cpp b/src/input_common/drivers/gc_adapter.cpp index d09ff178b..3ad34884d 100644 --- a/src/input_common/drivers/gc_adapter.cpp +++ b/src/input_common/drivers/gc_adapter.cpp | |||
| @@ -344,7 +344,7 @@ bool GCAdapter::IsVibrationEnabled([[maybe_unused]] const PadIdentifier& identif | |||
| 344 | 344 | ||
| 345 | void GCAdapter::UpdateVibrations() { | 345 | void GCAdapter::UpdateVibrations() { |
| 346 | // Use 8 states to keep the switching between on/off fast enough for | 346 | // Use 8 states to keep the switching between on/off fast enough for |
| 347 | // a human to feel different vibration strenght | 347 | // a human to feel different vibration strength |
| 348 | // More states == more rumble strengths == slower update time | 348 | // More states == more rumble strengths == slower update time |
| 349 | constexpr u8 vibration_states = 8; | 349 | constexpr u8 vibration_states = 8; |
| 350 | 350 | ||
diff --git a/src/input_common/drivers/joycon.h b/src/input_common/drivers/joycon.h index 473ba1b9e..5b40817e2 100644 --- a/src/input_common/drivers/joycon.h +++ b/src/input_common/drivers/joycon.h | |||
| @@ -62,7 +62,7 @@ private: | |||
| 62 | /// Registers controllers, clears all data and starts the scan thread | 62 | /// Registers controllers, clears all data and starts the scan thread |
| 63 | void Setup(); | 63 | void Setup(); |
| 64 | 64 | ||
| 65 | /// Actively searchs for new devices | 65 | /// Actively searches for new devices |
| 66 | void ScanThread(std::stop_token stop_token); | 66 | void ScanThread(std::stop_token stop_token); |
| 67 | 67 | ||
| 68 | /// Returns true if device is valid and not registered | 68 | /// Returns true if device is valid and not registered |
diff --git a/src/input_common/drivers/keyboard.cpp b/src/input_common/drivers/keyboard.cpp index 71e612fbf..2567df9af 100644 --- a/src/input_common/drivers/keyboard.cpp +++ b/src/input_common/drivers/keyboard.cpp | |||
| @@ -24,7 +24,7 @@ constexpr PadIdentifier keyboard_modifier_identifier = { | |||
| 24 | }; | 24 | }; |
| 25 | 25 | ||
| 26 | Keyboard::Keyboard(std::string input_engine_) : InputEngine(std::move(input_engine_)) { | 26 | Keyboard::Keyboard(std::string input_engine_) : InputEngine(std::move(input_engine_)) { |
| 27 | // Keyboard is broken into 3 diferent sets: | 27 | // Keyboard is broken into 3 different sets: |
| 28 | // key: Unfiltered intended for controllers. | 28 | // key: Unfiltered intended for controllers. |
| 29 | // keyboard_key: Allows only Settings::NativeKeyboard::Keys intended for keyboard emulation. | 29 | // keyboard_key: Allows only Settings::NativeKeyboard::Keys intended for keyboard emulation. |
| 30 | // keyboard_modifier: Allows only Settings::NativeKeyboard::Modifiers intended for keyboard | 30 | // keyboard_modifier: Allows only Settings::NativeKeyboard::Modifiers intended for keyboard |
diff --git a/src/input_common/drivers/mouse.cpp b/src/input_common/drivers/mouse.cpp index 94e92c37d..4fb2a6cfa 100644 --- a/src/input_common/drivers/mouse.cpp +++ b/src/input_common/drivers/mouse.cpp | |||
| @@ -142,7 +142,7 @@ void Mouse::Move(int x, int y, int center_x, int center_y) { | |||
| 142 | return; | 142 | return; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | // Make slow movements at least 3 units on lenght | 145 | // Make slow movements at least 3 units on length |
| 146 | if (move_distance < 3.0f) { | 146 | if (move_distance < 3.0f) { |
| 147 | // Normalize value | 147 | // Normalize value |
| 148 | mouse_change /= move_distance; | 148 | mouse_change /= move_distance; |
| @@ -154,7 +154,7 @@ void Mouse::Move(int x, int y, int center_x, int center_y) { | |||
| 154 | 154 | ||
| 155 | const auto last_move_distance = last_mouse_change.Length(); | 155 | const auto last_move_distance = last_mouse_change.Length(); |
| 156 | 156 | ||
| 157 | // Make fast movements clamp to 8 units on lenght | 157 | // Make fast movements clamp to 8 units on length |
| 158 | if (last_move_distance > 8.0f) { | 158 | if (last_move_distance > 8.0f) { |
| 159 | // Normalize value | 159 | // Normalize value |
| 160 | last_mouse_change /= last_move_distance; | 160 | last_mouse_change /= last_move_distance; |
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp index 5c20b3426..f7f0c7eaa 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp | |||
| @@ -748,7 +748,7 @@ ButtonMapping SDLDriver::GetButtonMappingForDevice(const Common::ParamPackage& p | |||
| 748 | 748 | ||
| 749 | // This list is missing ZL/ZR since those are not considered buttons in SDL GameController. | 749 | // This list is missing ZL/ZR since those are not considered buttons in SDL GameController. |
| 750 | // We will add those afterwards | 750 | // We will add those afterwards |
| 751 | // This list also excludes Screenshot since theres not really a mapping for that | 751 | // This list also excludes Screenshot since there's not really a mapping for that |
| 752 | ButtonBindings switch_to_sdl_button; | 752 | ButtonBindings switch_to_sdl_button; |
| 753 | 753 | ||
| 754 | if (SDL_GameControllerGetType(controller) == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO) { | 754 | if (SDL_GameControllerGetType(controller) == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO) { |
| @@ -1007,7 +1007,7 @@ MotionMapping SDLDriver::GetMotionMappingForDevice(const Common::ParamPackage& p | |||
| 1007 | 1007 | ||
| 1008 | Common::Input::ButtonNames SDLDriver::GetUIName(const Common::ParamPackage& params) const { | 1008 | Common::Input::ButtonNames SDLDriver::GetUIName(const Common::ParamPackage& params) const { |
| 1009 | if (params.Has("button")) { | 1009 | if (params.Has("button")) { |
| 1010 | // TODO(German77): Find how to substitue the values for real button names | 1010 | // TODO(German77): Find how to substitute the values for real button names |
| 1011 | return Common::Input::ButtonNames::Value; | 1011 | return Common::Input::ButtonNames::Value; |
| 1012 | } | 1012 | } |
| 1013 | if (params.Has("hat")) { | 1013 | if (params.Has("hat")) { |
diff --git a/src/input_common/drivers/virtual_amiibo.cpp b/src/input_common/drivers/virtual_amiibo.cpp index 4a0268a4d..304f4c70b 100644 --- a/src/input_common/drivers/virtual_amiibo.cpp +++ b/src/input_common/drivers/virtual_amiibo.cpp | |||
| @@ -57,7 +57,7 @@ Common::Input::NfcState VirtualAmiibo::WriteNfcData( | |||
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | if (!nfc_file.Write(data)) { | 59 | if (!nfc_file.Write(data)) { |
| 60 | LOG_ERROR(Service_NFP, "Error writting to file"); | 60 | LOG_ERROR(Service_NFP, "Error writing to file"); |
| 61 | return Common::Input::NfcState::WriteFailed; | 61 | return Common::Input::NfcState::WriteFailed; |
| 62 | } | 62 | } |
| 63 | 63 | ||
diff --git a/src/input_common/helpers/joycon_driver.cpp b/src/input_common/helpers/joycon_driver.cpp index 78cc5893c..83429a336 100644 --- a/src/input_common/helpers/joycon_driver.cpp +++ b/src/input_common/helpers/joycon_driver.cpp | |||
| @@ -164,8 +164,8 @@ void JoyconDriver::InputThread(std::stop_token stop_token) { | |||
| 164 | void JoyconDriver::OnNewData(std::span<u8> buffer) { | 164 | void JoyconDriver::OnNewData(std::span<u8> buffer) { |
| 165 | const auto report_mode = static_cast<ReportMode>(buffer[0]); | 165 | const auto report_mode = static_cast<ReportMode>(buffer[0]); |
| 166 | 166 | ||
| 167 | // Packages can be a litte bit inconsistent. Average the delta time to provide a smoother motion | 167 | // Packages can be a little bit inconsistent. Average the delta time to provide a smoother |
| 168 | // experience | 168 | // motion experience |
| 169 | switch (report_mode) { | 169 | switch (report_mode) { |
| 170 | case ReportMode::STANDARD_FULL_60HZ: | 170 | case ReportMode::STANDARD_FULL_60HZ: |
| 171 | case ReportMode::NFC_IR_MODE_60HZ: | 171 | case ReportMode::NFC_IR_MODE_60HZ: |
diff --git a/src/input_common/helpers/joycon_driver.h b/src/input_common/helpers/joycon_driver.h index b52a13ecf..72a9e71dc 100644 --- a/src/input_common/helpers/joycon_driver.h +++ b/src/input_common/helpers/joycon_driver.h | |||
| @@ -73,7 +73,7 @@ private: | |||
| 73 | /// Main thread, actively request new data from the handle | 73 | /// Main thread, actively request new data from the handle |
| 74 | void InputThread(std::stop_token stop_token); | 74 | void InputThread(std::stop_token stop_token); |
| 75 | 75 | ||
| 76 | /// Called everytime a valid package arrives | 76 | /// Called every time a valid package arrives |
| 77 | void OnNewData(std::span<u8> buffer); | 77 | void OnNewData(std::span<u8> buffer); |
| 78 | 78 | ||
| 79 | /// Updates device configuration to enable or disable features | 79 | /// Updates device configuration to enable or disable features |
| @@ -110,7 +110,7 @@ private: | |||
| 110 | bool amiibo_detected{}; | 110 | bool amiibo_detected{}; |
| 111 | bool is_ring_disabled_by_irs{}; | 111 | bool is_ring_disabled_by_irs{}; |
| 112 | 112 | ||
| 113 | // Harware configuration | 113 | // Hardware configuration |
| 114 | u8 leds{}; | 114 | u8 leds{}; |
| 115 | ReportMode mode{}; | 115 | ReportMode mode{}; |
| 116 | bool passive_enabled{}; // Low power mode, Ideal for multiple controllers at the same time | 116 | bool passive_enabled{}; // Low power mode, Ideal for multiple controllers at the same time |
diff --git a/src/input_common/helpers/joycon_protocol/common_protocol.h b/src/input_common/helpers/joycon_protocol/common_protocol.h index f44f73ba4..62cae739a 100644 --- a/src/input_common/helpers/joycon_protocol/common_protocol.h +++ b/src/input_common/helpers/joycon_protocol/common_protocol.h | |||
| @@ -68,7 +68,7 @@ public: | |||
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | /** | 70 | /** |
| 71 | * Waits for incoming data of the joycon device that matchs the subcommand | 71 | * Waits for incoming data of the joycon device that matches the subcommand |
| 72 | * @param sub_command type of data to be returned | 72 | * @param sub_command type of data to be returned |
| 73 | * @returns a buffer containing the response | 73 | * @returns a buffer containing the response |
| 74 | */ | 74 | */ |
| @@ -137,7 +137,7 @@ public: | |||
| 137 | DriverResult EnableMCU(bool enable); | 137 | DriverResult EnableMCU(bool enable); |
| 138 | 138 | ||
| 139 | /** | 139 | /** |
| 140 | * Configures the MCU to the correspoinding mode | 140 | * Configures the MCU to the corresponding mode |
| 141 | * @param MCUConfig configuration | 141 | * @param MCUConfig configuration |
| 142 | */ | 142 | */ |
| 143 | DriverResult ConfigureMCU(const MCUConfig& config); | 143 | DriverResult ConfigureMCU(const MCUConfig& config); |
diff --git a/src/input_common/helpers/udp_protocol.cpp b/src/input_common/helpers/udp_protocol.cpp index 994380d21..e54a8fce1 100644 --- a/src/input_common/helpers/udp_protocol.cpp +++ b/src/input_common/helpers/udp_protocol.cpp | |||
| @@ -25,7 +25,7 @@ namespace Response { | |||
| 25 | /** | 25 | /** |
| 26 | * Returns Type if the packet is valid, else none | 26 | * Returns Type if the packet is valid, else none |
| 27 | * | 27 | * |
| 28 | * Note: Modifies the buffer to zero out the crc (since thats the easiest way to check without | 28 | * Note: Modifies the buffer to zero out the crc (since that's the easiest way to check without |
| 29 | * copying the buffer) | 29 | * copying the buffer) |
| 30 | */ | 30 | */ |
| 31 | std::optional<Type> Validate(u8* data, std::size_t size) { | 31 | std::optional<Type> Validate(u8* data, std::size_t size) { |
diff --git a/src/input_common/main.h b/src/input_common/main.h index 1207d786c..d64a6cb4c 100644 --- a/src/input_common/main.h +++ b/src/input_common/main.h | |||
| @@ -132,7 +132,7 @@ public: | |||
| 132 | /// Retrieves the motion mappings for the given device. | 132 | /// Retrieves the motion mappings for the given device. |
| 133 | [[nodiscard]] MotionMapping GetMotionMappingForDevice(const Common::ParamPackage& device) const; | 133 | [[nodiscard]] MotionMapping GetMotionMappingForDevice(const Common::ParamPackage& device) const; |
| 134 | 134 | ||
| 135 | /// Returns an enum contaning the name to be displayed from the input engine. | 135 | /// Returns an enum containing the name to be displayed from the input engine. |
| 136 | [[nodiscard]] Common::Input::ButtonNames GetButtonName( | 136 | [[nodiscard]] Common::Input::ButtonNames GetButtonName( |
| 137 | const Common::ParamPackage& params) const; | 137 | const Common::ParamPackage& params) const; |
| 138 | 138 | ||