diff options
| author | 2024-01-15 23:26:08 -0500 | |
|---|---|---|
| committer | 2024-01-15 23:26:08 -0500 | |
| commit | 2c29c2b8dd280d0aeff432569f324cd85d83b415 (patch) | |
| tree | e5552e7f82ccb37b611a3a577f94c91f9c813320 /src/hid_core/frontend | |
| parent | Merge pull request #12681 from t895/stick-toggles (diff) | |
| parent | Fix typos in master (diff) | |
| download | yuzu-2c29c2b8dd280d0aeff432569f324cd85d83b415.tar.gz yuzu-2c29c2b8dd280d0aeff432569f324cd85d83b415.tar.xz yuzu-2c29c2b8dd280d0aeff432569f324cd85d83b415.zip | |
Merge pull request #12686 from szepeviktor/typos3
Fix more typos
Diffstat (limited to 'src/hid_core/frontend')
| -rw-r--r-- | src/hid_core/frontend/emulated_controller.cpp | 32 | ||||
| -rw-r--r-- | src/hid_core/frontend/emulated_controller.h | 2 | ||||
| -rw-r--r-- | src/hid_core/frontend/motion_input.h | 4 |
3 files changed, 19 insertions, 19 deletions
diff --git a/src/hid_core/frontend/emulated_controller.cpp b/src/hid_core/frontend/emulated_controller.cpp index a6a96935d..2ab93402d 100644 --- a/src/hid_core/frontend/emulated_controller.cpp +++ b/src/hid_core/frontend/emulated_controller.cpp | |||
| @@ -509,11 +509,11 @@ void EmulatedController::ReloadInput() { | |||
| 509 | }); | 509 | }); |
| 510 | } | 510 | } |
| 511 | turbo_button_state = 0; | 511 | turbo_button_state = 0; |
| 512 | is_initalized = true; | 512 | is_initialized = true; |
| 513 | } | 513 | } |
| 514 | 514 | ||
| 515 | void EmulatedController::UnloadInput() { | 515 | void EmulatedController::UnloadInput() { |
| 516 | is_initalized = false; | 516 | is_initialized = false; |
| 517 | for (auto& button : button_devices) { | 517 | for (auto& button : button_devices) { |
| 518 | button.reset(); | 518 | button.reset(); |
| 519 | } | 519 | } |
| @@ -1209,7 +1209,7 @@ void EmulatedController::SetNfc(const Common::Input::CallbackStatus& callback) { | |||
| 1209 | } | 1209 | } |
| 1210 | 1210 | ||
| 1211 | bool EmulatedController::SetVibration(std::size_t device_index, VibrationValue vibration) { | 1211 | bool EmulatedController::SetVibration(std::size_t device_index, VibrationValue vibration) { |
| 1212 | if (!is_initalized) { | 1212 | if (!is_initialized) { |
| 1213 | return false; | 1213 | return false; |
| 1214 | } | 1214 | } |
| 1215 | if (device_index >= output_devices.size()) { | 1215 | if (device_index >= output_devices.size()) { |
| @@ -1247,7 +1247,7 @@ bool EmulatedController::IsVibrationEnabled(std::size_t device_index) { | |||
| 1247 | const auto player_index = Service::HID::NpadIdTypeToIndex(npad_id_type); | 1247 | const auto player_index = Service::HID::NpadIdTypeToIndex(npad_id_type); |
| 1248 | const auto& player = Settings::values.players.GetValue()[player_index]; | 1248 | const auto& player = Settings::values.players.GetValue()[player_index]; |
| 1249 | 1249 | ||
| 1250 | if (!is_initalized) { | 1250 | if (!is_initialized) { |
| 1251 | return false; | 1251 | return false; |
| 1252 | } | 1252 | } |
| 1253 | 1253 | ||
| @@ -1270,7 +1270,7 @@ Common::Input::DriverResult EmulatedController::SetPollingMode( | |||
| 1270 | EmulatedDeviceIndex device_index, Common::Input::PollingMode polling_mode) { | 1270 | EmulatedDeviceIndex device_index, Common::Input::PollingMode polling_mode) { |
| 1271 | LOG_INFO(Service_HID, "Set polling mode {}, device_index={}", polling_mode, device_index); | 1271 | LOG_INFO(Service_HID, "Set polling mode {}, device_index={}", polling_mode, device_index); |
| 1272 | 1272 | ||
| 1273 | if (!is_initalized) { | 1273 | if (!is_initialized) { |
| 1274 | return Common::Input::DriverResult::InvalidHandle; | 1274 | return Common::Input::DriverResult::InvalidHandle; |
| 1275 | } | 1275 | } |
| 1276 | 1276 | ||
| @@ -1319,7 +1319,7 @@ bool EmulatedController::SetCameraFormat( | |||
| 1319 | Core::IrSensor::ImageTransferProcessorFormat camera_format) { | 1319 | Core::IrSensor::ImageTransferProcessorFormat camera_format) { |
| 1320 | LOG_INFO(Service_HID, "Set camera format {}", camera_format); | 1320 | LOG_INFO(Service_HID, "Set camera format {}", camera_format); |
| 1321 | 1321 | ||
| 1322 | if (!is_initalized) { | 1322 | if (!is_initialized) { |
| 1323 | return false; | 1323 | return false; |
| 1324 | } | 1324 | } |
| 1325 | 1325 | ||
| @@ -1347,7 +1347,7 @@ void EmulatedController::SetRingParam(Common::ParamPackage param) { | |||
| 1347 | 1347 | ||
| 1348 | bool EmulatedController::HasNfc() const { | 1348 | bool EmulatedController::HasNfc() const { |
| 1349 | 1349 | ||
| 1350 | if (!is_initalized) { | 1350 | if (!is_initialized) { |
| 1351 | return false; | 1351 | return false; |
| 1352 | } | 1352 | } |
| 1353 | 1353 | ||
| @@ -1388,7 +1388,7 @@ bool EmulatedController::RemoveNfcHandle() { | |||
| 1388 | } | 1388 | } |
| 1389 | 1389 | ||
| 1390 | bool EmulatedController::StartNfcPolling() { | 1390 | bool EmulatedController::StartNfcPolling() { |
| 1391 | if (!is_initalized) { | 1391 | if (!is_initialized) { |
| 1392 | return false; | 1392 | return false; |
| 1393 | } | 1393 | } |
| 1394 | 1394 | ||
| @@ -1403,7 +1403,7 @@ bool EmulatedController::StartNfcPolling() { | |||
| 1403 | } | 1403 | } |
| 1404 | 1404 | ||
| 1405 | bool EmulatedController::StopNfcPolling() { | 1405 | bool EmulatedController::StopNfcPolling() { |
| 1406 | if (!is_initalized) { | 1406 | if (!is_initialized) { |
| 1407 | return false; | 1407 | return false; |
| 1408 | } | 1408 | } |
| 1409 | 1409 | ||
| @@ -1418,7 +1418,7 @@ bool EmulatedController::StopNfcPolling() { | |||
| 1418 | } | 1418 | } |
| 1419 | 1419 | ||
| 1420 | bool EmulatedController::ReadAmiiboData(std::vector<u8>& data) { | 1420 | bool EmulatedController::ReadAmiiboData(std::vector<u8>& data) { |
| 1421 | if (!is_initalized) { | 1421 | if (!is_initialized) { |
| 1422 | return false; | 1422 | return false; |
| 1423 | } | 1423 | } |
| 1424 | 1424 | ||
| @@ -1434,7 +1434,7 @@ bool EmulatedController::ReadAmiiboData(std::vector<u8>& data) { | |||
| 1434 | 1434 | ||
| 1435 | bool EmulatedController::ReadMifareData(const Common::Input::MifareRequest& request, | 1435 | bool EmulatedController::ReadMifareData(const Common::Input::MifareRequest& request, |
| 1436 | Common::Input::MifareRequest& out_data) { | 1436 | Common::Input::MifareRequest& out_data) { |
| 1437 | if (!is_initalized) { | 1437 | if (!is_initialized) { |
| 1438 | return false; | 1438 | return false; |
| 1439 | } | 1439 | } |
| 1440 | 1440 | ||
| @@ -1450,7 +1450,7 @@ bool EmulatedController::ReadMifareData(const Common::Input::MifareRequest& requ | |||
| 1450 | } | 1450 | } |
| 1451 | 1451 | ||
| 1452 | bool EmulatedController::WriteMifareData(const Common::Input::MifareRequest& request) { | 1452 | bool EmulatedController::WriteMifareData(const Common::Input::MifareRequest& request) { |
| 1453 | if (!is_initalized) { | 1453 | if (!is_initialized) { |
| 1454 | return false; | 1454 | return false; |
| 1455 | } | 1455 | } |
| 1456 | 1456 | ||
| @@ -1465,7 +1465,7 @@ bool EmulatedController::WriteMifareData(const Common::Input::MifareRequest& req | |||
| 1465 | } | 1465 | } |
| 1466 | 1466 | ||
| 1467 | bool EmulatedController::WriteNfc(const std::vector<u8>& data) { | 1467 | bool EmulatedController::WriteNfc(const std::vector<u8>& data) { |
| 1468 | if (!is_initalized) { | 1468 | if (!is_initialized) { |
| 1469 | return false; | 1469 | return false; |
| 1470 | } | 1470 | } |
| 1471 | 1471 | ||
| @@ -1480,7 +1480,7 @@ bool EmulatedController::WriteNfc(const std::vector<u8>& data) { | |||
| 1480 | } | 1480 | } |
| 1481 | 1481 | ||
| 1482 | void EmulatedController::SetLedPattern() { | 1482 | void EmulatedController::SetLedPattern() { |
| 1483 | if (!is_initalized) { | 1483 | if (!is_initialized) { |
| 1484 | return; | 1484 | return; |
| 1485 | } | 1485 | } |
| 1486 | 1486 | ||
| @@ -1508,8 +1508,8 @@ void EmulatedController::SetGyroscopeZeroDriftMode(GyroscopeZeroDriftMode mode) | |||
| 1508 | motion.emulated.SetGyroThreshold(motion.emulated.ThresholdLoose); | 1508 | motion.emulated.SetGyroThreshold(motion.emulated.ThresholdLoose); |
| 1509 | break; | 1509 | break; |
| 1510 | case GyroscopeZeroDriftMode::Tight: | 1510 | case GyroscopeZeroDriftMode::Tight: |
| 1511 | motion_sensitivity = motion.emulated.IsAtRestThight; | 1511 | motion_sensitivity = motion.emulated.IsAtRestTight; |
| 1512 | motion.emulated.SetGyroThreshold(motion.emulated.ThresholdThight); | 1512 | motion.emulated.SetGyroThreshold(motion.emulated.ThresholdTight); |
| 1513 | break; | 1513 | break; |
| 1514 | case GyroscopeZeroDriftMode::Standard: | 1514 | case GyroscopeZeroDriftMode::Standard: |
| 1515 | default: | 1515 | default: |
diff --git a/src/hid_core/frontend/emulated_controller.h b/src/hid_core/frontend/emulated_controller.h index 94798164d..90e536e07 100644 --- a/src/hid_core/frontend/emulated_controller.h +++ b/src/hid_core/frontend/emulated_controller.h | |||
| @@ -559,7 +559,7 @@ private: | |||
| 559 | NpadStyleTag supported_style_tag{NpadStyleSet::All}; | 559 | NpadStyleTag supported_style_tag{NpadStyleSet::All}; |
| 560 | bool is_connected{false}; | 560 | bool is_connected{false}; |
| 561 | bool is_configuring{false}; | 561 | bool is_configuring{false}; |
| 562 | bool is_initalized{false}; | 562 | bool is_initialized{false}; |
| 563 | bool system_buttons_enabled{true}; | 563 | bool system_buttons_enabled{true}; |
| 564 | f32 motion_sensitivity{Core::HID::MotionInput::IsAtRestStandard}; | 564 | f32 motion_sensitivity{Core::HID::MotionInput::IsAtRestStandard}; |
| 565 | u32 turbo_button_state{0}; | 565 | u32 turbo_button_state{0}; |
diff --git a/src/hid_core/frontend/motion_input.h b/src/hid_core/frontend/motion_input.h index 11678983d..c902a3a6e 100644 --- a/src/hid_core/frontend/motion_input.h +++ b/src/hid_core/frontend/motion_input.h | |||
| @@ -13,12 +13,12 @@ class MotionInput { | |||
| 13 | public: | 13 | public: |
| 14 | static constexpr float ThresholdLoose = 0.01f; | 14 | static constexpr float ThresholdLoose = 0.01f; |
| 15 | static constexpr float ThresholdStandard = 0.007f; | 15 | static constexpr float ThresholdStandard = 0.007f; |
| 16 | static constexpr float ThresholdThight = 0.002f; | 16 | static constexpr float ThresholdTight = 0.002f; |
| 17 | 17 | ||
| 18 | static constexpr float IsAtRestRelaxed = 0.05f; | 18 | static constexpr float IsAtRestRelaxed = 0.05f; |
| 19 | static constexpr float IsAtRestLoose = 0.02f; | 19 | static constexpr float IsAtRestLoose = 0.02f; |
| 20 | static constexpr float IsAtRestStandard = 0.01f; | 20 | static constexpr float IsAtRestStandard = 0.01f; |
| 21 | static constexpr float IsAtRestThight = 0.005f; | 21 | static constexpr float IsAtRestTight = 0.005f; |
| 22 | 22 | ||
| 23 | static constexpr float GyroMaxValue = 5.0f; | 23 | static constexpr float GyroMaxValue = 5.0f; |
| 24 | static constexpr float AccelMaxValue = 7.0f; | 24 | static constexpr float AccelMaxValue = 7.0f; |