diff options
| author | 2024-01-08 20:31:48 +0100 | |
|---|---|---|
| committer | 2024-01-08 13:31:48 -0600 | |
| commit | f12446167491b3e691f6a93a01cad3bd9e54d105 (patch) | |
| tree | 8992865b548e08317504d653880c3ee4aacb6ad4 /src/core/hle/service/hid | |
| parent | Merge pull request #12608 from szepeviktor/typos (diff) | |
| download | yuzu-f12446167491b3e691f6a93a01cad3bd9e54d105.tar.gz yuzu-f12446167491b3e691f6a93a01cad3bd9e54d105.tar.xz yuzu-f12446167491b3e691f6a93a01cad3bd9e54d105.zip | |
Fix typos in src/core (#12625)
* Fix typos in src/core
* Fix typo correction
* Fix indentation of MemoryStateNames
* Fix indent
Diffstat (limited to 'src/core/hle/service/hid')
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/hid/hidbus.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/service/hid/hidbus.h | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index fc8a3ab66..fc03a0a5f 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -18,23 +18,23 @@ namespace Service::HID { | |||
| 18 | 18 | ||
| 19 | void LoopProcess(Core::System& system) { | 19 | void LoopProcess(Core::System& system) { |
| 20 | auto server_manager = std::make_unique<ServerManager>(system); | 20 | auto server_manager = std::make_unique<ServerManager>(system); |
| 21 | std::shared_ptr<ResourceManager> resouce_manager = std::make_shared<ResourceManager>(system); | 21 | std::shared_ptr<ResourceManager> resource_manager = std::make_shared<ResourceManager>(system); |
| 22 | std::shared_ptr<HidFirmwareSettings> firmware_settings = | 22 | std::shared_ptr<HidFirmwareSettings> firmware_settings = |
| 23 | std::make_shared<HidFirmwareSettings>(); | 23 | std::make_shared<HidFirmwareSettings>(); |
| 24 | 24 | ||
| 25 | // TODO: Remove this hack until this service is emulated properly. | 25 | // TODO: Remove this hack until this service is emulated properly. |
| 26 | const auto process_list = system.Kernel().GetProcessList(); | 26 | const auto process_list = system.Kernel().GetProcessList(); |
| 27 | if (!process_list.empty()) { | 27 | if (!process_list.empty()) { |
| 28 | resouce_manager->Initialize(); | 28 | resource_manager->Initialize(); |
| 29 | resouce_manager->RegisterAppletResourceUserId(process_list[0]->GetId(), true); | 29 | resource_manager->RegisterAppletResourceUserId(process_list[0]->GetId(), true); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | server_manager->RegisterNamedService( | 32 | server_manager->RegisterNamedService( |
| 33 | "hid", std::make_shared<IHidServer>(system, resouce_manager, firmware_settings)); | 33 | "hid", std::make_shared<IHidServer>(system, resource_manager, firmware_settings)); |
| 34 | server_manager->RegisterNamedService( | 34 | server_manager->RegisterNamedService( |
| 35 | "hid:dbg", std::make_shared<IHidDebugServer>(system, resouce_manager)); | 35 | "hid:dbg", std::make_shared<IHidDebugServer>(system, resource_manager)); |
| 36 | server_manager->RegisterNamedService( | 36 | server_manager->RegisterNamedService( |
| 37 | "hid:sys", std::make_shared<IHidSystemServer>(system, resouce_manager)); | 37 | "hid:sys", std::make_shared<IHidSystemServer>(system, resource_manager)); |
| 38 | 38 | ||
| 39 | server_manager->RegisterNamedService("hidbus", std::make_shared<HidBus>(system)); | 39 | server_manager->RegisterNamedService("hidbus", std::make_shared<HidBus>(system)); |
| 40 | 40 | ||
diff --git a/src/core/hle/service/hid/hidbus.cpp b/src/core/hle/service/hid/hidbus.cpp index 46f503d38..c903ee8b8 100644 --- a/src/core/hle/service/hid/hidbus.cpp +++ b/src/core/hle/service/hid/hidbus.cpp | |||
| @@ -67,7 +67,7 @@ HidBus::~HidBus() { | |||
| 67 | void HidBus::UpdateHidbus(std::chrono::nanoseconds ns_late) { | 67 | void HidBus::UpdateHidbus(std::chrono::nanoseconds ns_late) { |
| 68 | if (is_hidbus_enabled) { | 68 | if (is_hidbus_enabled) { |
| 69 | for (std::size_t i = 0; i < devices.size(); ++i) { | 69 | for (std::size_t i = 0; i < devices.size(); ++i) { |
| 70 | if (!devices[i].is_device_initializated) { | 70 | if (!devices[i].is_device_initialized) { |
| 71 | continue; | 71 | continue; |
| 72 | } | 72 | } |
| 73 | auto& device = devices[i].device; | 73 | auto& device = devices[i].device; |
| @@ -213,7 +213,7 @@ void HidBus::Initialize(HLERequestContext& ctx) { | |||
| 213 | 213 | ||
| 214 | if (bus_handle_.internal_index == 0 && Settings::values.enable_ring_controller) { | 214 | if (bus_handle_.internal_index == 0 && Settings::values.enable_ring_controller) { |
| 215 | MakeDevice<RingController>(bus_handle_); | 215 | MakeDevice<RingController>(bus_handle_); |
| 216 | devices[device_index.value()].is_device_initializated = true; | 216 | devices[device_index.value()].is_device_initialized = true; |
| 217 | devices[device_index.value()].device->ActivateDevice(); | 217 | devices[device_index.value()].device->ActivateDevice(); |
| 218 | cur_entry.is_in_focus = true; | 218 | cur_entry.is_in_focus = true; |
| 219 | cur_entry.is_connected = true; | 219 | cur_entry.is_connected = true; |
| @@ -222,7 +222,7 @@ void HidBus::Initialize(HLERequestContext& ctx) { | |||
| 222 | cur_entry.is_polling_mode = false; | 222 | cur_entry.is_polling_mode = false; |
| 223 | } else { | 223 | } else { |
| 224 | MakeDevice<HidbusStubbed>(bus_handle_); | 224 | MakeDevice<HidbusStubbed>(bus_handle_); |
| 225 | devices[device_index.value()].is_device_initializated = true; | 225 | devices[device_index.value()].is_device_initialized = true; |
| 226 | cur_entry.is_in_focus = true; | 226 | cur_entry.is_in_focus = true; |
| 227 | cur_entry.is_connected = false; | 227 | cur_entry.is_connected = false; |
| 228 | cur_entry.is_connected_result = ResultSuccess; | 228 | cur_entry.is_connected_result = ResultSuccess; |
| @@ -261,7 +261,7 @@ void HidBus::Finalize(HLERequestContext& ctx) { | |||
| 261 | const auto entry_index = devices[device_index.value()].handle.internal_index; | 261 | const auto entry_index = devices[device_index.value()].handle.internal_index; |
| 262 | auto& cur_entry = hidbus_status.entries[entry_index]; | 262 | auto& cur_entry = hidbus_status.entries[entry_index]; |
| 263 | auto& device = devices[device_index.value()].device; | 263 | auto& device = devices[device_index.value()].device; |
| 264 | devices[device_index.value()].is_device_initializated = false; | 264 | devices[device_index.value()].is_device_initialized = false; |
| 265 | device->DeactivateDevice(); | 265 | device->DeactivateDevice(); |
| 266 | 266 | ||
| 267 | cur_entry.is_in_focus = true; | 267 | cur_entry.is_in_focus = true; |
diff --git a/src/core/hle/service/hid/hidbus.h b/src/core/hle/service/hid/hidbus.h index 05f62f634..03d9f6863 100644 --- a/src/core/hle/service/hid/hidbus.h +++ b/src/core/hle/service/hid/hidbus.h | |||
| @@ -89,7 +89,7 @@ private: | |||
| 89 | static_assert(sizeof(HidbusStatusManager) <= 0x1000, "HidbusStatusManager is an invalid size"); | 89 | static_assert(sizeof(HidbusStatusManager) <= 0x1000, "HidbusStatusManager is an invalid size"); |
| 90 | 90 | ||
| 91 | struct HidbusDevice { | 91 | struct HidbusDevice { |
| 92 | bool is_device_initializated{}; | 92 | bool is_device_initialized{}; |
| 93 | BusHandle handle{}; | 93 | BusHandle handle{}; |
| 94 | std::unique_ptr<HidbusBase> device{nullptr}; | 94 | std::unique_ptr<HidbusBase> device{nullptr}; |
| 95 | }; | 95 | }; |