diff options
Diffstat (limited to 'src')
36 files changed, 86 insertions, 86 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt index 132f002fb..b54a19c65 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt | |||
| @@ -104,7 +104,7 @@ object FileUtil { | |||
| 104 | 104 | ||
| 105 | /** | 105 | /** |
| 106 | * Reference: https://stackoverflow.com/questions/42186820/documentfile-is-very-slow | 106 | * Reference: https://stackoverflow.com/questions/42186820/documentfile-is-very-slow |
| 107 | * This function will be faster than DoucmentFile.listFiles | 107 | * This function will be faster than DocumentFile.listFiles |
| 108 | * @param uri Directory uri. | 108 | * @param uri Directory uri. |
| 109 | * @return CheapDocument lists. | 109 | * @return CheapDocument lists. |
| 110 | */ | 110 | */ |
diff --git a/src/android/app/src/main/jni/native_config.cpp b/src/android/app/src/main/jni/native_config.cpp index 535902483..c6c3343dc 100644 --- a/src/android/app/src/main/jni/native_config.cpp +++ b/src/android/app/src/main/jni/native_config.cpp | |||
| @@ -205,7 +205,7 @@ jboolean Java_org_yuzu_yuzu_1emu_utils_NativeConfig_getIsRuntimeModifiable(JNIEn | |||
| 205 | jstring jkey) { | 205 | jstring jkey) { |
| 206 | auto setting = getSetting<std::string>(env, jkey); | 206 | auto setting = getSetting<std::string>(env, jkey); |
| 207 | if (setting != nullptr) { | 207 | if (setting != nullptr) { |
| 208 | return setting->RuntimeModfiable(); | 208 | return setting->RuntimeModifiable(); |
| 209 | } | 209 | } |
| 210 | return true; | 210 | return true; |
| 211 | } | 211 | } |
diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 3bb92ad67..547752bda 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml | |||
| @@ -410,7 +410,7 @@ | |||
| 410 | <string name="language_japanese" translatable="false">日本語</string> | 410 | <string name="language_japanese" translatable="false">日本語</string> |
| 411 | <string name="language_english" translatable="false">English</string> | 411 | <string name="language_english" translatable="false">English</string> |
| 412 | <string name="language_french" translatable="false">Français</string> | 412 | <string name="language_french" translatable="false">Français</string> |
| 413 | <string name="langauge_german" translatable="false">Deutsch</string> | 413 | <string name="language_german" translatable="false">Deutsch</string> |
| 414 | <string name="language_italian" translatable="false">Italiano</string> | 414 | <string name="language_italian" translatable="false">Italiano</string> |
| 415 | <string name="language_spanish" translatable="false">Español</string> | 415 | <string name="language_spanish" translatable="false">Español</string> |
| 416 | <string name="language_chinese" translatable="false">简体中文</string> | 416 | <string name="language_chinese" translatable="false">简体中文</string> |
diff --git a/src/audio_core/adsp/adsp.cpp b/src/audio_core/adsp/adsp.cpp index 6c53c98fd..48f0a63d4 100644 --- a/src/audio_core/adsp/adsp.cpp +++ b/src/audio_core/adsp/adsp.cpp | |||
| @@ -11,7 +11,7 @@ ADSP::ADSP(Core::System& system, Sink::Sink& sink) { | |||
| 11 | opus_decoder = std::make_unique<OpusDecoder::OpusDecoder>(system); | 11 | opus_decoder = std::make_unique<OpusDecoder::OpusDecoder>(system); |
| 12 | opus_decoder->Send(Direction::DSP, OpusDecoder::Message::Start); | 12 | opus_decoder->Send(Direction::DSP, OpusDecoder::Message::Start); |
| 13 | if (opus_decoder->Receive(Direction::Host) != OpusDecoder::Message::StartOK) { | 13 | if (opus_decoder->Receive(Direction::Host) != OpusDecoder::Message::StartOK) { |
| 14 | LOG_ERROR(Service_Audio, "OpusDeocder failed to initialize."); | 14 | LOG_ERROR(Service_Audio, "OpusDecoder failed to initialize."); |
| 15 | return; | 15 | return; |
| 16 | } | 16 | } |
| 17 | } | 17 | } |
diff --git a/src/audio_core/renderer/command/command_generator.cpp b/src/audio_core/renderer/command/command_generator.cpp index ccb186209..f97db5899 100644 --- a/src/audio_core/renderer/command/command_generator.cpp +++ b/src/audio_core/renderer/command/command_generator.cpp | |||
| @@ -41,7 +41,7 @@ void CommandGenerator::GenerateDataSourceCommand(VoiceInfo& voice_info, | |||
| 41 | const VoiceState& voice_state, const s8 channel) { | 41 | const VoiceState& voice_state, const s8 channel) { |
| 42 | if (voice_info.mix_id == UnusedMixId) { | 42 | if (voice_info.mix_id == UnusedMixId) { |
| 43 | if (voice_info.splitter_id != UnusedSplitterId) { | 43 | if (voice_info.splitter_id != UnusedSplitterId) { |
| 44 | auto destination{splitter_context.GetDesintationData(voice_info.splitter_id, 0)}; | 44 | auto destination{splitter_context.GetDestinationData(voice_info.splitter_id, 0)}; |
| 45 | u32 dest_id{0}; | 45 | u32 dest_id{0}; |
| 46 | while (destination != nullptr) { | 46 | while (destination != nullptr) { |
| 47 | if (destination->IsConfigured()) { | 47 | if (destination->IsConfigured()) { |
| @@ -55,7 +55,7 @@ void CommandGenerator::GenerateDataSourceCommand(VoiceInfo& voice_info, | |||
| 55 | } | 55 | } |
| 56 | } | 56 | } |
| 57 | dest_id++; | 57 | dest_id++; |
| 58 | destination = splitter_context.GetDesintationData(voice_info.splitter_id, dest_id); | 58 | destination = splitter_context.GetDestinationData(voice_info.splitter_id, dest_id); |
| 59 | } | 59 | } |
| 60 | } | 60 | } |
| 61 | } else { | 61 | } else { |
| @@ -234,7 +234,7 @@ void CommandGenerator::GenerateVoiceCommand(VoiceInfo& voice_info) { | |||
| 234 | if (voice_info.mix_id == UnusedMixId) { | 234 | if (voice_info.mix_id == UnusedMixId) { |
| 235 | if (voice_info.splitter_id != UnusedSplitterId) { | 235 | if (voice_info.splitter_id != UnusedSplitterId) { |
| 236 | auto i{channel}; | 236 | auto i{channel}; |
| 237 | auto destination{splitter_context.GetDesintationData(voice_info.splitter_id, i)}; | 237 | auto destination{splitter_context.GetDestinationData(voice_info.splitter_id, i)}; |
| 238 | while (destination != nullptr) { | 238 | while (destination != nullptr) { |
| 239 | if (destination->IsConfigured()) { | 239 | if (destination->IsConfigured()) { |
| 240 | const auto mix_id{destination->GetMixId()}; | 240 | const auto mix_id{destination->GetMixId()}; |
| @@ -249,7 +249,7 @@ void CommandGenerator::GenerateVoiceCommand(VoiceInfo& voice_info) { | |||
| 249 | } | 249 | } |
| 250 | } | 250 | } |
| 251 | i += voice_info.channel_count; | 251 | i += voice_info.channel_count; |
| 252 | destination = splitter_context.GetDesintationData(voice_info.splitter_id, i); | 252 | destination = splitter_context.GetDestinationData(voice_info.splitter_id, i); |
| 253 | } | 253 | } |
| 254 | } | 254 | } |
| 255 | } else { | 255 | } else { |
| @@ -591,7 +591,7 @@ void CommandGenerator::GenerateMixCommands(MixInfo& mix_info) { | |||
| 591 | if (mix_info.dst_splitter_id != UnusedSplitterId) { | 591 | if (mix_info.dst_splitter_id != UnusedSplitterId) { |
| 592 | s16 dest_id{0}; | 592 | s16 dest_id{0}; |
| 593 | auto destination{ | 593 | auto destination{ |
| 594 | splitter_context.GetDesintationData(mix_info.dst_splitter_id, dest_id)}; | 594 | splitter_context.GetDestinationData(mix_info.dst_splitter_id, dest_id)}; |
| 595 | while (destination != nullptr) { | 595 | while (destination != nullptr) { |
| 596 | if (destination->IsConfigured()) { | 596 | if (destination->IsConfigured()) { |
| 597 | auto splitter_mix_id{destination->GetMixId()}; | 597 | auto splitter_mix_id{destination->GetMixId()}; |
| @@ -612,7 +612,7 @@ void CommandGenerator::GenerateMixCommands(MixInfo& mix_info) { | |||
| 612 | } | 612 | } |
| 613 | dest_id++; | 613 | dest_id++; |
| 614 | destination = | 614 | destination = |
| 615 | splitter_context.GetDesintationData(mix_info.dst_splitter_id, dest_id); | 615 | splitter_context.GetDestinationData(mix_info.dst_splitter_id, dest_id); |
| 616 | } | 616 | } |
| 617 | } | 617 | } |
| 618 | } else { | 618 | } else { |
diff --git a/src/audio_core/renderer/mix/mix_info.cpp b/src/audio_core/renderer/mix/mix_info.cpp index 5e44bde18..68bbe0aed 100644 --- a/src/audio_core/renderer/mix/mix_info.cpp +++ b/src/audio_core/renderer/mix/mix_info.cpp | |||
| @@ -93,7 +93,7 @@ bool MixInfo::UpdateConnection(EdgeMatrix& edge_matrix, const InParameter& in_pa | |||
| 93 | 93 | ||
| 94 | for (u32 i = 0; i < destination_count; i++) { | 94 | for (u32 i = 0; i < destination_count; i++) { |
| 95 | auto destination{ | 95 | auto destination{ |
| 96 | splitter_context.GetDesintationData(in_params.dest_splitter_id, i)}; | 96 | splitter_context.GetDestinationData(in_params.dest_splitter_id, i)}; |
| 97 | 97 | ||
| 98 | if (destination) { | 98 | if (destination) { |
| 99 | const auto destination_id{destination->GetMixId()}; | 99 | const auto destination_id{destination->GetMixId()}; |
diff --git a/src/audio_core/renderer/splitter/splitter_context.cpp b/src/audio_core/renderer/splitter/splitter_context.cpp index 686150ea6..d0f3b60c2 100644 --- a/src/audio_core/renderer/splitter/splitter_context.cpp +++ b/src/audio_core/renderer/splitter/splitter_context.cpp | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | namespace AudioCore::Renderer { | 10 | namespace AudioCore::Renderer { |
| 11 | 11 | ||
| 12 | SplitterDestinationData* SplitterContext::GetDesintationData(const s32 splitter_id, | 12 | SplitterDestinationData* SplitterContext::GetDestinationData(const s32 splitter_id, |
| 13 | const s32 destination_id) { | 13 | const s32 destination_id) { |
| 14 | return splitter_infos[splitter_id].GetData(destination_id); | 14 | return splitter_infos[splitter_id].GetData(destination_id); |
| 15 | } | 15 | } |
diff --git a/src/audio_core/renderer/splitter/splitter_context.h b/src/audio_core/renderer/splitter/splitter_context.h index 556e6dcc3..1c0b84671 100644 --- a/src/audio_core/renderer/splitter/splitter_context.h +++ b/src/audio_core/renderer/splitter/splitter_context.h | |||
| @@ -42,7 +42,7 @@ public: | |||
| 42 | * @param destination_id - Destination index within the splitter. | 42 | * @param destination_id - Destination index within the splitter. |
| 43 | * @return Pointer to the found destination. May be nullptr. | 43 | * @return Pointer to the found destination. May be nullptr. |
| 44 | */ | 44 | */ |
| 45 | SplitterDestinationData* GetDesintationData(s32 splitter_id, s32 destination_id); | 45 | SplitterDestinationData* GetDestinationData(s32 splitter_id, s32 destination_id); |
| 46 | 46 | ||
| 47 | /** | 47 | /** |
| 48 | * Get a splitter from the given index. | 48 | * Get a splitter from the given index. |
diff --git a/src/common/settings_common.cpp b/src/common/settings_common.cpp index 5960b78aa..b90e3509c 100644 --- a/src/common/settings_common.cpp +++ b/src/common/settings_common.cpp | |||
| @@ -35,7 +35,7 @@ bool BasicSetting::Save() const { | |||
| 35 | return save; | 35 | return save; |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | bool BasicSetting::RuntimeModfiable() const { | 38 | bool BasicSetting::RuntimeModifiable() const { |
| 39 | return runtime_modifiable; | 39 | return runtime_modifiable; |
| 40 | } | 40 | } |
| 41 | 41 | ||
diff --git a/src/common/settings_common.h b/src/common/settings_common.h index 1a290ad77..987489e8a 100644 --- a/src/common/settings_common.h +++ b/src/common/settings_common.h | |||
| @@ -186,7 +186,7 @@ public: | |||
| 186 | /** | 186 | /** |
| 187 | * @returns true if the current setting can be changed while the guest is running. | 187 | * @returns true if the current setting can be changed while the guest is running. |
| 188 | */ | 188 | */ |
| 189 | [[nodiscard]] bool RuntimeModfiable() const; | 189 | [[nodiscard]] bool RuntimeModifiable() const; |
| 190 | 190 | ||
| 191 | /** | 191 | /** |
| 192 | * @returns A unique number corresponding to the setting. | 192 | * @returns A unique number corresponding to the setting. |
diff --git a/src/hid_core/frontend/emulated_controller.cpp b/src/hid_core/frontend/emulated_controller.cpp index 3d2d1e9f9..3f36be367 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; |
diff --git a/src/hid_core/hid_result.h b/src/hid_core/hid_result.h index bb14aa61e..df9b28c9a 100644 --- a/src/hid_core/hid_result.h +++ b/src/hid_core/hid_result.h | |||
| @@ -15,7 +15,7 @@ constexpr Result ResultVibrationNotInitialized{ErrorModule::HID, 121}; | |||
| 15 | constexpr Result ResultVibrationInvalidStyleIndex{ErrorModule::HID, 122}; | 15 | constexpr Result ResultVibrationInvalidStyleIndex{ErrorModule::HID, 122}; |
| 16 | constexpr Result ResultVibrationInvalidNpadId{ErrorModule::HID, 123}; | 16 | constexpr Result ResultVibrationInvalidNpadId{ErrorModule::HID, 123}; |
| 17 | constexpr Result ResultVibrationDeviceIndexOutOfRange{ErrorModule::HID, 124}; | 17 | constexpr Result ResultVibrationDeviceIndexOutOfRange{ErrorModule::HID, 124}; |
| 18 | constexpr Result ResultVibrationStrenghtOutOfRange{ErrorModule::HID, 126}; | 18 | constexpr Result ResultVibrationStrengthOutOfRange{ErrorModule::HID, 126}; |
| 19 | constexpr Result ResultVibrationArraySizeMismatch{ErrorModule::HID, 131}; | 19 | constexpr Result ResultVibrationArraySizeMismatch{ErrorModule::HID, 131}; |
| 20 | 20 | ||
| 21 | constexpr Result InvalidSixAxisFusionRange{ErrorModule::HID, 423}; | 21 | constexpr Result InvalidSixAxisFusionRange{ErrorModule::HID, 423}; |
diff --git a/src/hid_core/irsensor/irs_types.h b/src/hid_core/irsensor/irs_types.h index 017f38e6c..d7354de21 100644 --- a/src/hid_core/irsensor/irs_types.h +++ b/src/hid_core/irsensor/irs_types.h | |||
| @@ -106,8 +106,8 @@ enum class HandAnalysisMode : u32 { | |||
| 106 | None, | 106 | None, |
| 107 | Silhouette, | 107 | Silhouette, |
| 108 | Image, | 108 | Image, |
| 109 | SilhoueteAndImage, | 109 | SilhouetteAndImage, |
| 110 | SilhuetteOnly, | 110 | SilhouetteOnly, |
| 111 | }; | 111 | }; |
| 112 | 112 | ||
| 113 | // This is nn::irsensor::IrSensorFunctionLevel | 113 | // This is nn::irsensor::IrSensorFunctionLevel |
diff --git a/src/hid_core/resources/hid_firmware_settings.cpp b/src/hid_core/resources/hid_firmware_settings.cpp index e76b3a016..9fa0db17e 100644 --- a/src/hid_core/resources/hid_firmware_settings.cpp +++ b/src/hid_core/resources/hid_firmware_settings.cpp | |||
| @@ -14,7 +14,7 @@ void HidFirmwareSettings::Reload() { | |||
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | void HidFirmwareSettings::LoadSettings(bool reload_config) { | 16 | void HidFirmwareSettings::LoadSettings(bool reload_config) { |
| 17 | if (is_initalized && !reload_config) { | 17 | if (is_initialized && !reload_config) { |
| 18 | return; | 18 | return; |
| 19 | } | 19 | } |
| 20 | 20 | ||
| @@ -33,7 +33,7 @@ void HidFirmwareSettings::LoadSettings(bool reload_config) { | |||
| 33 | is_handheld_forced = true; | 33 | is_handheld_forced = true; |
| 34 | features_per_id_disabled = {}; | 34 | features_per_id_disabled = {}; |
| 35 | is_touch_firmware_auto_update_disabled = false; | 35 | is_touch_firmware_auto_update_disabled = false; |
| 36 | is_initalized = true; | 36 | is_initialized = true; |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | bool HidFirmwareSettings::IsDebugPadEnabled() { | 39 | bool HidFirmwareSettings::IsDebugPadEnabled() { |
diff --git a/src/hid_core/resources/hid_firmware_settings.h b/src/hid_core/resources/hid_firmware_settings.h index 6c10c440b..00201fd94 100644 --- a/src/hid_core/resources/hid_firmware_settings.h +++ b/src/hid_core/resources/hid_firmware_settings.h | |||
| @@ -33,7 +33,7 @@ public: | |||
| 33 | FeaturesPerId FeaturesDisabledPerId(); | 33 | FeaturesPerId FeaturesDisabledPerId(); |
| 34 | 34 | ||
| 35 | private: | 35 | private: |
| 36 | bool is_initalized{}; | 36 | bool is_initialized{}; |
| 37 | 37 | ||
| 38 | // Debug settings | 38 | // Debug settings |
| 39 | bool is_debug_pad_enabled{}; | 39 | bool is_debug_pad_enabled{}; |
diff --git a/src/hid_core/resources/six_axis/six_axis.cpp b/src/hid_core/resources/six_axis/six_axis.cpp index 8a9677c50..404e4e6ca 100644 --- a/src/hid_core/resources/six_axis/six_axis.cpp +++ b/src/hid_core/resources/six_axis/six_axis.cpp | |||
| @@ -249,7 +249,7 @@ Result SixAxis::EnableSixAxisSensorUnalteredPassthrough( | |||
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | auto& sixaxis = GetSixaxisState(sixaxis_handle); | 251 | auto& sixaxis = GetSixaxisState(sixaxis_handle); |
| 252 | sixaxis.unaltered_passtrough = is_enabled; | 252 | sixaxis.unaltered_passthrough = is_enabled; |
| 253 | return ResultSuccess; | 253 | return ResultSuccess; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| @@ -262,7 +262,7 @@ Result SixAxis::IsSixAxisSensorUnalteredPassthroughEnabled( | |||
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | const auto& sixaxis = GetSixaxisState(sixaxis_handle); | 264 | const auto& sixaxis = GetSixaxisState(sixaxis_handle); |
| 265 | is_enabled = sixaxis.unaltered_passtrough; | 265 | is_enabled = sixaxis.unaltered_passthrough; |
| 266 | return ResultSuccess; | 266 | return ResultSuccess; |
| 267 | } | 267 | } |
| 268 | 268 | ||
diff --git a/src/hid_core/resources/six_axis/six_axis.h b/src/hid_core/resources/six_axis/six_axis.h index 1054e1b27..b4b00a441 100644 --- a/src/hid_core/resources/six_axis/six_axis.h +++ b/src/hid_core/resources/six_axis/six_axis.h | |||
| @@ -62,7 +62,7 @@ private: | |||
| 62 | 62 | ||
| 63 | struct SixaxisParameters { | 63 | struct SixaxisParameters { |
| 64 | bool is_fusion_enabled{true}; | 64 | bool is_fusion_enabled{true}; |
| 65 | bool unaltered_passtrough{false}; | 65 | bool unaltered_passthrough{false}; |
| 66 | Core::HID::SixAxisSensorFusionParameters fusion{}; | 66 | Core::HID::SixAxisSensorFusionParameters fusion{}; |
| 67 | Core::HID::SixAxisSensorCalibrationParameter calibration{}; | 67 | Core::HID::SixAxisSensorCalibrationParameter calibration{}; |
| 68 | Core::HID::SixAxisSensorIcInformation ic_information{}; | 68 | Core::HID::SixAxisSensorIcInformation ic_information{}; |
diff --git a/src/input_common/drivers/gc_adapter.cpp b/src/input_common/drivers/gc_adapter.cpp index 1ff296af5..f1184a5fa 100644 --- a/src/input_common/drivers/gc_adapter.cpp +++ b/src/input_common/drivers/gc_adapter.cpp | |||
| @@ -451,11 +451,11 @@ ButtonMapping GCAdapter::GetButtonMappingForDevice(const Common::ParamPackage& p | |||
| 451 | std::tuple{Settings::NativeButton::ZL, PadButton::TriggerL, PadAxes::TriggerLeft}, | 451 | std::tuple{Settings::NativeButton::ZL, PadButton::TriggerL, PadAxes::TriggerLeft}, |
| 452 | {Settings::NativeButton::ZR, PadButton::TriggerR, PadAxes::TriggerRight}, | 452 | {Settings::NativeButton::ZR, PadButton::TriggerR, PadAxes::TriggerRight}, |
| 453 | }; | 453 | }; |
| 454 | for (const auto& [switch_button, gcadapter_buton, gcadapter_axis] : switch_to_gcadapter_axis) { | 454 | for (const auto& [switch_button, gcadapter_button, gcadapter_axis] : switch_to_gcadapter_axis) { |
| 455 | Common::ParamPackage button_params{}; | 455 | Common::ParamPackage button_params{}; |
| 456 | button_params.Set("engine", GetEngineName()); | 456 | button_params.Set("engine", GetEngineName()); |
| 457 | button_params.Set("port", params.Get("port", 0)); | 457 | button_params.Set("port", params.Get("port", 0)); |
| 458 | button_params.Set("button", static_cast<s32>(gcadapter_buton)); | 458 | button_params.Set("button", static_cast<s32>(gcadapter_button)); |
| 459 | button_params.Set("axis", static_cast<s32>(gcadapter_axis)); | 459 | button_params.Set("axis", static_cast<s32>(gcadapter_axis)); |
| 460 | button_params.Set("threshold", 0.5f); | 460 | button_params.Set("threshold", 0.5f); |
| 461 | button_params.Set("range", 1.9f); | 461 | button_params.Set("range", 1.9f); |
diff --git a/src/input_common/helpers/joycon_protocol/irs.cpp b/src/input_common/helpers/joycon_protocol/irs.cpp index 68b0589e3..5bf72114d 100644 --- a/src/input_common/helpers/joycon_protocol/irs.cpp +++ b/src/input_common/helpers/joycon_protocol/irs.cpp | |||
| @@ -236,9 +236,9 @@ Common::Input::DriverResult IrsProtocol::WriteRegistersStep2() { | |||
| 236 | .number_of_registers = 0x8, | 236 | .number_of_registers = 0x8, |
| 237 | .registers = | 237 | .registers = |
| 238 | { | 238 | { |
| 239 | IrsRegister{IrRegistersAddress::LedIntensitiyMSB, | 239 | IrsRegister{IrRegistersAddress::LedIntensityMSB, |
| 240 | static_cast<u8>(led_intensity >> 8)}, | 240 | static_cast<u8>(led_intensity >> 8)}, |
| 241 | {IrRegistersAddress::LedIntensitiyLSB, static_cast<u8>(led_intensity & 0xff)}, | 241 | {IrRegistersAddress::LedIntensityLSB, static_cast<u8>(led_intensity & 0xff)}, |
| 242 | {IrRegistersAddress::ImageFlip, static_cast<u8>(image_flip)}, | 242 | {IrRegistersAddress::ImageFlip, static_cast<u8>(image_flip)}, |
| 243 | {IrRegistersAddress::DenoiseSmoothing, static_cast<u8>((denoise >> 16) & 0xff)}, | 243 | {IrRegistersAddress::DenoiseSmoothing, static_cast<u8>((denoise >> 16) & 0xff)}, |
| 244 | {IrRegistersAddress::DenoiseEdge, static_cast<u8>((denoise >> 8) & 0xff)}, | 244 | {IrRegistersAddress::DenoiseEdge, static_cast<u8>((denoise >> 8) & 0xff)}, |
diff --git a/src/input_common/helpers/joycon_protocol/joycon_types.h b/src/input_common/helpers/joycon_protocol/joycon_types.h index 77a43c67a..792f124e1 100644 --- a/src/input_common/helpers/joycon_protocol/joycon_types.h +++ b/src/input_common/helpers/joycon_protocol/joycon_types.h | |||
| @@ -282,7 +282,7 @@ enum class NFCCommand : u8 { | |||
| 282 | CancelAll = 0x00, | 282 | CancelAll = 0x00, |
| 283 | StartPolling = 0x01, | 283 | StartPolling = 0x01, |
| 284 | StopPolling = 0x02, | 284 | StopPolling = 0x02, |
| 285 | StartWaitingRecieve = 0x04, | 285 | StartWaitingReceive = 0x04, |
| 286 | ReadNtag = 0x06, | 286 | ReadNtag = 0x06, |
| 287 | WriteNtag = 0x08, | 287 | WriteNtag = 0x08, |
| 288 | Mifare = 0x0F, | 288 | Mifare = 0x0F, |
| @@ -382,8 +382,8 @@ enum class IrRegistersAddress : u16 { | |||
| 382 | FinalizeConfig = 0x0700, | 382 | FinalizeConfig = 0x0700, |
| 383 | LedFilter = 0x0e00, | 383 | LedFilter = 0x0e00, |
| 384 | Leds = 0x1000, | 384 | Leds = 0x1000, |
| 385 | LedIntensitiyMSB = 0x1100, | 385 | LedIntensityMSB = 0x1100, |
| 386 | LedIntensitiyLSB = 0x1200, | 386 | LedIntensityLSB = 0x1200, |
| 387 | ImageFlip = 0x2d00, | 387 | ImageFlip = 0x2d00, |
| 388 | Resolution = 0x2e00, | 388 | Resolution = 0x2e00, |
| 389 | DigitalGainLSB = 0x2e01, | 389 | DigitalGainLSB = 0x2e01, |
diff --git a/src/input_common/helpers/joycon_protocol/nfc.cpp b/src/input_common/helpers/joycon_protocol/nfc.cpp index 09953394b..db83f9ef4 100644 --- a/src/input_common/helpers/joycon_protocol/nfc.cpp +++ b/src/input_common/helpers/joycon_protocol/nfc.cpp | |||
| @@ -519,13 +519,13 @@ Common::Input::DriverResult NfcProtocol::GetMifareData( | |||
| 519 | } | 519 | } |
| 520 | 520 | ||
| 521 | if (output.mcu_report == MCUReport::NFCState && output.mcu_data[1] == 0x10) { | 521 | if (output.mcu_report == MCUReport::NFCState && output.mcu_data[1] == 0x10) { |
| 522 | constexpr std::size_t DATA_LENGHT = 0x10 + 1; | 522 | constexpr std::size_t DATA_LENGTH = 0x10 + 1; |
| 523 | constexpr std::size_t DATA_START = 11; | 523 | constexpr std::size_t DATA_START = 11; |
| 524 | const u8 number_of_elements = output.mcu_data[10]; | 524 | const u8 number_of_elements = output.mcu_data[10]; |
| 525 | for (std::size_t i = 0; i < number_of_elements; i++) { | 525 | for (std::size_t i = 0; i < number_of_elements; i++) { |
| 526 | out_data[i].sector = output.mcu_data[DATA_START + (i * DATA_LENGHT)]; | 526 | out_data[i].sector = output.mcu_data[DATA_START + (i * DATA_LENGTH)]; |
| 527 | memcpy(out_data[i].data.data(), | 527 | memcpy(out_data[i].data.data(), |
| 528 | output.mcu_data.data() + DATA_START + 1 + (i * DATA_LENGHT), | 528 | output.mcu_data.data() + DATA_START + 1 + (i * DATA_LENGTH), |
| 529 | sizeof(MifareReadData::data)); | 529 | sizeof(MifareReadData::data)); |
| 530 | } | 530 | } |
| 531 | package_index++; | 531 | package_index++; |
| @@ -659,7 +659,7 @@ Common::Input::DriverResult NfcProtocol::SendStopPollingRequest(MCUCommandRespon | |||
| 659 | Common::Input::DriverResult NfcProtocol::SendNextPackageRequest(MCUCommandResponse& output, | 659 | Common::Input::DriverResult NfcProtocol::SendNextPackageRequest(MCUCommandResponse& output, |
| 660 | u8 packet_id) { | 660 | u8 packet_id) { |
| 661 | NFCRequestState request{ | 661 | NFCRequestState request{ |
| 662 | .command_argument = NFCCommand::StartWaitingRecieve, | 662 | .command_argument = NFCCommand::StartWaitingReceive, |
| 663 | .block_id = {}, | 663 | .block_id = {}, |
| 664 | .packet_id = packet_id, | 664 | .packet_id = packet_id, |
| 665 | .packet_flag = MCUPacketFlag::LastCommandPacket, | 665 | .packet_flag = MCUPacketFlag::LastCommandPacket, |
diff --git a/src/input_common/helpers/joycon_protocol/rumble.cpp b/src/input_common/helpers/joycon_protocol/rumble.cpp index 7647f505e..9fd0b8470 100644 --- a/src/input_common/helpers/joycon_protocol/rumble.cpp +++ b/src/input_common/helpers/joycon_protocol/rumble.cpp | |||
| @@ -67,7 +67,7 @@ u8 RumbleProtocol::EncodeHighAmplitude(f32 amplitude) const { | |||
| 67 | // More information about these values can be found here: | 67 | // More information about these values can be found here: |
| 68 | // https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/rumble_data_table.md | 68 | // https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/rumble_data_table.md |
| 69 | 69 | ||
| 70 | static constexpr std::array<std::pair<f32, int>, 101> high_fequency_amplitude{ | 70 | static constexpr std::array<std::pair<f32, int>, 101> high_frequency_amplitude{ |
| 71 | std::pair<f32, int>{0.0f, 0x0}, | 71 | std::pair<f32, int>{0.0f, 0x0}, |
| 72 | {0.01f, 0x2}, | 72 | {0.01f, 0x2}, |
| 73 | {0.012f, 0x4}, | 73 | {0.012f, 0x4}, |
| @@ -171,20 +171,20 @@ u8 RumbleProtocol::EncodeHighAmplitude(f32 amplitude) const { | |||
| 171 | {1.003f, 0xc8}, | 171 | {1.003f, 0xc8}, |
| 172 | }; | 172 | }; |
| 173 | 173 | ||
| 174 | for (const auto& [amplitude_value, code] : high_fequency_amplitude) { | 174 | for (const auto& [amplitude_value, code] : high_frequency_amplitude) { |
| 175 | if (amplitude <= amplitude_value) { | 175 | if (amplitude <= amplitude_value) { |
| 176 | return static_cast<u8>(code); | 176 | return static_cast<u8>(code); |
| 177 | } | 177 | } |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | return static_cast<u8>(high_fequency_amplitude[high_fequency_amplitude.size() - 1].second); | 180 | return static_cast<u8>(high_frequency_amplitude[high_frequency_amplitude.size() - 1].second); |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | u16 RumbleProtocol::EncodeLowAmplitude(f32 amplitude) const { | 183 | u16 RumbleProtocol::EncodeLowAmplitude(f32 amplitude) const { |
| 184 | // More information about these values can be found here: | 184 | // More information about these values can be found here: |
| 185 | // https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/rumble_data_table.md | 185 | // https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/rumble_data_table.md |
| 186 | 186 | ||
| 187 | static constexpr std::array<std::pair<f32, int>, 101> high_fequency_amplitude{ | 187 | static constexpr std::array<std::pair<f32, int>, 101> high_frequency_amplitude{ |
| 188 | std::pair<f32, int>{0.0f, 0x0040}, | 188 | std::pair<f32, int>{0.0f, 0x0040}, |
| 189 | {0.01f, 0x8040}, | 189 | {0.01f, 0x8040}, |
| 190 | {0.012f, 0x0041}, | 190 | {0.012f, 0x0041}, |
| @@ -288,13 +288,13 @@ u16 RumbleProtocol::EncodeLowAmplitude(f32 amplitude) const { | |||
| 288 | {1.003f, 0x0072}, | 288 | {1.003f, 0x0072}, |
| 289 | }; | 289 | }; |
| 290 | 290 | ||
| 291 | for (const auto& [amplitude_value, code] : high_fequency_amplitude) { | 291 | for (const auto& [amplitude_value, code] : high_frequency_amplitude) { |
| 292 | if (amplitude <= amplitude_value) { | 292 | if (amplitude <= amplitude_value) { |
| 293 | return static_cast<u16>(code); | 293 | return static_cast<u16>(code); |
| 294 | } | 294 | } |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | return static_cast<u16>(high_fequency_amplitude[high_fequency_amplitude.size() - 1].second); | 297 | return static_cast<u16>(high_frequency_amplitude[high_frequency_amplitude.size() - 1].second); |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | } // namespace InputCommon::Joycon | 300 | } // namespace InputCommon::Joycon |
diff --git a/src/input_common/helpers/udp_protocol.h b/src/input_common/helpers/udp_protocol.h index d9643ffe0..dba9f87d9 100644 --- a/src/input_common/helpers/udp_protocol.h +++ b/src/input_common/helpers/udp_protocol.h | |||
| @@ -78,7 +78,7 @@ namespace Request { | |||
| 78 | enum RegisterFlags : u8 { | 78 | enum RegisterFlags : u8 { |
| 79 | AllPads, | 79 | AllPads, |
| 80 | PadID, | 80 | PadID, |
| 81 | PadMACAdddress, | 81 | PadMACAddress, |
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| 84 | struct Version {}; | 84 | struct Version {}; |
diff --git a/src/network/room_member.cpp b/src/network/room_member.cpp index b94cb24ad..a6845273c 100644 --- a/src/network/room_member.cpp +++ b/src/network/room_member.cpp | |||
| @@ -724,7 +724,7 @@ RoomMember::CallbackHandle<RoomInformation> RoomMember::BindOnRoomInformationCha | |||
| 724 | return room_member_impl->Bind(callback); | 724 | return room_member_impl->Bind(callback); |
| 725 | } | 725 | } |
| 726 | 726 | ||
| 727 | RoomMember::CallbackHandle<ChatEntry> RoomMember::BindOnChatMessageRecieved( | 727 | RoomMember::CallbackHandle<ChatEntry> RoomMember::BindOnChatMessageReceived( |
| 728 | std::function<void(const ChatEntry&)> callback) { | 728 | std::function<void(const ChatEntry&)> callback) { |
| 729 | return room_member_impl->Bind(callback); | 729 | return room_member_impl->Bind(callback); |
| 730 | } | 730 | } |
diff --git a/src/network/room_member.h b/src/network/room_member.h index 33ac18e72..37e9ea16a 100644 --- a/src/network/room_member.h +++ b/src/network/room_member.h | |||
| @@ -254,7 +254,7 @@ public: | |||
| 254 | * @param callback The function to call | 254 | * @param callback The function to call |
| 255 | * @return A handle used for removing the function from the registered list | 255 | * @return A handle used for removing the function from the registered list |
| 256 | */ | 256 | */ |
| 257 | CallbackHandle<ChatEntry> BindOnChatMessageRecieved( | 257 | CallbackHandle<ChatEntry> BindOnChatMessageReceived( |
| 258 | std::function<void(const ChatEntry&)> callback); | 258 | std::function<void(const ChatEntry&)> callback); |
| 259 | 259 | ||
| 260 | /** | 260 | /** |
diff --git a/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp b/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp index b2ceeefc4..c5ac7b8f2 100644 --- a/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp +++ b/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp | |||
| @@ -608,8 +608,8 @@ std::string EmitContext::DefineGlobalMemoryFunctions() { | |||
| 608 | const auto aligned_low_addr{fmt::format("{}&{}", addr_xy[0], ssbo_align_mask)}; | 608 | const auto aligned_low_addr{fmt::format("{}&{}", addr_xy[0], ssbo_align_mask)}; |
| 609 | const auto aligned_addr{fmt::format("uvec2({},{})", aligned_low_addr, addr_xy[1])}; | 609 | const auto aligned_addr{fmt::format("uvec2({},{})", aligned_low_addr, addr_xy[1])}; |
| 610 | const auto addr_pack{fmt::format("packUint2x32({})", aligned_addr)}; | 610 | const auto addr_pack{fmt::format("packUint2x32({})", aligned_addr)}; |
| 611 | const auto addr_statment{fmt::format("uint64_t {}={};", ssbo_addr, addr_pack)}; | 611 | const auto addr_statement{fmt::format("uint64_t {}={};", ssbo_addr, addr_pack)}; |
| 612 | func += addr_statment; | 612 | func += addr_statement; |
| 613 | 613 | ||
| 614 | const auto size_vec{fmt::format("uvec2({},{})", size_xy[0], size_xy[1])}; | 614 | const auto size_vec{fmt::format("uvec2({},{})", size_xy[0], size_xy[1])}; |
| 615 | const auto comp_lhs{fmt::format("(addr>={})", ssbo_addr)}; | 615 | const auto comp_lhs{fmt::format("(addr>={})", ssbo_addr)}; |
diff --git a/src/yuzu/applets/qt_amiibo_settings.cpp b/src/yuzu/applets/qt_amiibo_settings.cpp index b457a736a..b91796dde 100644 --- a/src/yuzu/applets/qt_amiibo_settings.cpp +++ b/src/yuzu/applets/qt_amiibo_settings.cpp | |||
| @@ -36,7 +36,7 @@ QtAmiiboSettingsDialog::QtAmiiboSettingsDialog(QWidget* parent, | |||
| 36 | QtAmiiboSettingsDialog::~QtAmiiboSettingsDialog() = default; | 36 | QtAmiiboSettingsDialog::~QtAmiiboSettingsDialog() = default; |
| 37 | 37 | ||
| 38 | int QtAmiiboSettingsDialog::exec() { | 38 | int QtAmiiboSettingsDialog::exec() { |
| 39 | if (!is_initalized) { | 39 | if (!is_initialized) { |
| 40 | return QDialog::Rejected; | 40 | return QDialog::Rejected; |
| 41 | } | 41 | } |
| 42 | return QDialog::exec(); | 42 | return QDialog::exec(); |
| @@ -66,7 +66,7 @@ void QtAmiiboSettingsDialog::LoadInfo() { | |||
| 66 | QString::fromStdString(input_subsystem->GetVirtualAmiibo()->GetLastFilePath())); | 66 | QString::fromStdString(input_subsystem->GetVirtualAmiibo()->GetLastFilePath())); |
| 67 | 67 | ||
| 68 | SetSettingsDescription(); | 68 | SetSettingsDescription(); |
| 69 | is_initalized = true; | 69 | is_initialized = true; |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | void QtAmiiboSettingsDialog::LoadAmiiboInfo() { | 72 | void QtAmiiboSettingsDialog::LoadAmiiboInfo() { |
diff --git a/src/yuzu/applets/qt_amiibo_settings.h b/src/yuzu/applets/qt_amiibo_settings.h index ee66a0255..3833cf6f2 100644 --- a/src/yuzu/applets/qt_amiibo_settings.h +++ b/src/yuzu/applets/qt_amiibo_settings.h | |||
| @@ -58,7 +58,7 @@ private: | |||
| 58 | Core::Frontend::CabinetParameters parameters; | 58 | Core::Frontend::CabinetParameters parameters; |
| 59 | 59 | ||
| 60 | // If false amiibo settings failed to load | 60 | // If false amiibo settings failed to load |
| 61 | bool is_initalized{}; | 61 | bool is_initialized{}; |
| 62 | }; | 62 | }; |
| 63 | 63 | ||
| 64 | class QtAmiiboSettings final : public QObject, public Core::Frontend::CabinetApplet { | 64 | class QtAmiiboSettings final : public QObject, public Core::Frontend::CabinetApplet { |
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h index 60edd464c..ae12b3481 100644 --- a/src/yuzu/bootmanager.h +++ b/src/yuzu/bootmanager.h | |||
| @@ -170,7 +170,7 @@ public: | |||
| 170 | 170 | ||
| 171 | void resizeEvent(QResizeEvent* event) override; | 171 | void resizeEvent(QResizeEvent* event) override; |
| 172 | 172 | ||
| 173 | /// Converts a Qt keybard key into NativeKeyboard key | 173 | /// Converts a Qt keyboard key into NativeKeyboard key |
| 174 | static int QtKeyToSwitchKey(Qt::Key qt_keys); | 174 | static int QtKeyToSwitchKey(Qt::Key qt_keys); |
| 175 | 175 | ||
| 176 | /// Converts a Qt modifier keys into NativeKeyboard modifier keys | 176 | /// Converts a Qt modifier keys into NativeKeyboard modifier keys |
diff --git a/src/yuzu/configuration/configure_input_player_widget.cpp b/src/yuzu/configuration/configure_input_player_widget.cpp index 19fdca7d3..8e1b5eb4b 100644 --- a/src/yuzu/configuration/configure_input_player_widget.cpp +++ b/src/yuzu/configuration/configure_input_player_widget.cpp | |||
| @@ -845,12 +845,12 @@ void PlayerControlPreview::DrawProController(QPainter& p, const QPointF center) | |||
| 845 | DrawSymbol(p, face_center + QPoint(-face_distance, 1), Symbol::Y, text_size); | 845 | DrawSymbol(p, face_center + QPoint(-face_distance, 1), Symbol::Y, text_size); |
| 846 | 846 | ||
| 847 | // D-pad buttons | 847 | // D-pad buttons |
| 848 | const QPointF dpad_postion = center + QPoint(-61, 0); | 848 | const QPointF dpad_position = center + QPoint(-61, 0); |
| 849 | DrawArrowButton(p, dpad_postion, Direction::Up, button_values[DUp]); | 849 | DrawArrowButton(p, dpad_position, Direction::Up, button_values[DUp]); |
| 850 | DrawArrowButton(p, dpad_postion, Direction::Left, button_values[DLeft]); | 850 | DrawArrowButton(p, dpad_position, Direction::Left, button_values[DLeft]); |
| 851 | DrawArrowButton(p, dpad_postion, Direction::Right, button_values[DRight]); | 851 | DrawArrowButton(p, dpad_position, Direction::Right, button_values[DRight]); |
| 852 | DrawArrowButton(p, dpad_postion, Direction::Down, button_values[DDown]); | 852 | DrawArrowButton(p, dpad_position, Direction::Down, button_values[DDown]); |
| 853 | DrawArrowButtonOutline(p, dpad_postion); | 853 | DrawArrowButtonOutline(p, dpad_position); |
| 854 | 854 | ||
| 855 | // ZL and ZR buttons | 855 | // ZL and ZR buttons |
| 856 | p.setPen(colors.outline); | 856 | p.setPen(colors.outline); |
| @@ -935,13 +935,13 @@ void PlayerControlPreview::DrawGCController(QPainter& p, const QPointF center) { | |||
| 935 | DrawSymbol(p, center + QPoint(100, -83), Symbol::Y, text_size); | 935 | DrawSymbol(p, center + QPoint(100, -83), Symbol::Y, text_size); |
| 936 | 936 | ||
| 937 | // D-pad buttons | 937 | // D-pad buttons |
| 938 | const QPointF dpad_postion = center + QPoint(-61, 37); | 938 | const QPointF dpad_position = center + QPoint(-61, 37); |
| 939 | const float dpad_size = 0.8f; | 939 | const float dpad_size = 0.8f; |
| 940 | DrawArrowButton(p, dpad_postion, Direction::Up, button_values[DUp], dpad_size); | 940 | DrawArrowButton(p, dpad_position, Direction::Up, button_values[DUp], dpad_size); |
| 941 | DrawArrowButton(p, dpad_postion, Direction::Left, button_values[DLeft], dpad_size); | 941 | DrawArrowButton(p, dpad_position, Direction::Left, button_values[DLeft], dpad_size); |
| 942 | DrawArrowButton(p, dpad_postion, Direction::Right, button_values[DRight], dpad_size); | 942 | DrawArrowButton(p, dpad_position, Direction::Right, button_values[DRight], dpad_size); |
| 943 | DrawArrowButton(p, dpad_postion, Direction::Down, button_values[DDown], dpad_size); | 943 | DrawArrowButton(p, dpad_position, Direction::Down, button_values[DDown], dpad_size); |
| 944 | DrawArrowButtonOutline(p, dpad_postion, dpad_size); | 944 | DrawArrowButtonOutline(p, dpad_position, dpad_size); |
| 945 | 945 | ||
| 946 | // Minus and Plus buttons | 946 | // Minus and Plus buttons |
| 947 | p.setPen(colors.outline); | 947 | p.setPen(colors.outline); |
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index 7cbf43775..b0b84f967 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp | |||
| @@ -121,7 +121,7 @@ void ConfigureSystem::Setup(const ConfigurationShared::Builder& builder) { | |||
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | if (setting->Id() == Settings::values.region_index.Id()) { | 123 | if (setting->Id() == Settings::values.region_index.Id()) { |
| 124 | // Keep track of the region_index (and langauge_index) combobox to validate the selected | 124 | // Keep track of the region_index (and language_index) combobox to validate the selected |
| 125 | // settings | 125 | // settings |
| 126 | combo_region = widget->combobox; | 126 | combo_region = widget->combobox; |
| 127 | } else if (setting->Id() == Settings::values.language_index.Id()) { | 127 | } else if (setting->Id() == Settings::values.language_index.Id()) { |
diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index 941683a43..85f4f7655 100644 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp | |||
| @@ -750,12 +750,12 @@ Widget::Widget(Settings::BasicSetting* setting_, const TranslationMap& translati | |||
| 750 | } | 750 | } |
| 751 | 751 | ||
| 752 | apply_funcs.push_back([load_func, setting_](bool powered_on) { | 752 | apply_funcs.push_back([load_func, setting_](bool powered_on) { |
| 753 | if (setting_->RuntimeModfiable() || !powered_on) { | 753 | if (setting_->RuntimeModifiable() || !powered_on) { |
| 754 | load_func(); | 754 | load_func(); |
| 755 | } | 755 | } |
| 756 | }); | 756 | }); |
| 757 | 757 | ||
| 758 | bool enable = runtime_lock || setting.RuntimeModfiable(); | 758 | bool enable = runtime_lock || setting.RuntimeModifiable(); |
| 759 | if (setting.Switchable() && Settings::IsConfiguringGlobal() && !runtime_lock) { | 759 | if (setting.Switchable() && Settings::IsConfiguringGlobal() && !runtime_lock) { |
| 760 | enable &= setting.UsingGlobal(); | 760 | enable &= setting.UsingGlobal(); |
| 761 | } | 761 | } |
diff --git a/src/yuzu/multiplayer/chat_room.cpp b/src/yuzu/multiplayer/chat_room.cpp index dec9696c1..4463616b4 100644 --- a/src/yuzu/multiplayer/chat_room.cpp +++ b/src/yuzu/multiplayer/chat_room.cpp | |||
| @@ -206,7 +206,7 @@ void ChatRoom::Initialize(Network::RoomNetwork* room_network_) { | |||
| 206 | room_network = room_network_; | 206 | room_network = room_network_; |
| 207 | // setup the callbacks for network updates | 207 | // setup the callbacks for network updates |
| 208 | if (auto member = room_network->GetRoomMember().lock()) { | 208 | if (auto member = room_network->GetRoomMember().lock()) { |
| 209 | member->BindOnChatMessageRecieved( | 209 | member->BindOnChatMessageReceived( |
| 210 | [this](const Network::ChatEntry& chat) { emit ChatReceived(chat); }); | 210 | [this](const Network::ChatEntry& chat) { emit ChatReceived(chat); }); |
| 211 | member->BindOnStatusMessageReceived( | 211 | member->BindOnStatusMessageReceived( |
| 212 | [this](const Network::StatusMessageEntry& status_message) { | 212 | [this](const Network::StatusMessageEntry& status_message) { |
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index a81635fa4..c3cacf852 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -401,7 +401,7 @@ int main(int argc, char** argv) { | |||
| 401 | 401 | ||
| 402 | if (use_multiplayer) { | 402 | if (use_multiplayer) { |
| 403 | if (auto member = system.GetRoomNetwork().GetRoomMember().lock()) { | 403 | if (auto member = system.GetRoomNetwork().GetRoomMember().lock()) { |
| 404 | member->BindOnChatMessageRecieved(OnMessageReceived); | 404 | member->BindOnChatMessageReceived(OnMessageReceived); |
| 405 | member->BindOnStatusMessageReceived(OnStatusMessageReceived); | 405 | member->BindOnStatusMessageReceived(OnStatusMessageReceived); |
| 406 | member->BindOnStateChanged(OnStateChanged); | 406 | member->BindOnStateChanged(OnStateChanged); |
| 407 | member->BindOnError(OnNetworkError); | 407 | member->BindOnError(OnNetworkError); |