diff options
Diffstat (limited to 'src/core/hle/service/ir/ir.cpp')
-rw-r--r-- | src/core/hle/service/ir/ir.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/core/hle/service/ir/ir.cpp b/src/core/hle/service/ir/ir.cpp index 079a87e48..fc048ae88 100644 --- a/src/core/hle/service/ir/ir.cpp +++ b/src/core/hle/service/ir/ir.cpp @@ -5,11 +5,11 @@ #include "core/hle/kernel/event.h" #include "core/hle/kernel/shared_memory.h" -#include "core/hle/service/service.h" #include "core/hle/service/ir/ir.h" #include "core/hle/service/ir/ir_rst.h" #include "core/hle/service/ir/ir_u.h" #include "core/hle/service/ir/ir_user.h" +#include "core/hle/service/service.h" namespace Service { namespace IR { @@ -32,14 +32,14 @@ void InitializeIrNopShared(Interface* self) { u32* cmd_buff = Kernel::GetCommandBuffer(); u32 transfer_buff_size = cmd_buff[1]; - u32 recv_buff_size = cmd_buff[2]; - u32 unk1 = cmd_buff[3]; - u32 send_buff_size = cmd_buff[4]; - u32 unk2 = cmd_buff[5]; - u8 baud_rate = cmd_buff[6] & 0xFF; - Handle handle = cmd_buff[8]; - - if(Kernel::g_handle_table.IsValid(handle)) { + u32 recv_buff_size = cmd_buff[2]; + u32 unk1 = cmd_buff[3]; + u32 send_buff_size = cmd_buff[4]; + u32 unk2 = cmd_buff[5]; + u8 baud_rate = cmd_buff[6] & 0xFF; + Handle handle = cmd_buff[8]; + + if (Kernel::g_handle_table.IsValid(handle)) { transfer_shared_memory = Kernel::g_handle_table.Get<Kernel::SharedMemory>(handle); transfer_shared_memory->name = "IR:TransferSharedMemory"; } @@ -47,7 +47,7 @@ void InitializeIrNopShared(Interface* self) { cmd_buff[1] = RESULT_SUCCESS.raw; LOG_WARNING(Service_IR, "(STUBBED) called, transfer_buff_size=%d, recv_buff_size=%d, " - "unk1=%d, send_buff_size=%d, unk2=%d, baud_rate=%u, handle=0x%08X", + "unk1=%d, send_buff_size=%d, unk2=%d, baud_rate=%u, handle=0x%08X", transfer_buff_size, recv_buff_size, unk1, send_buff_size, unk2, baud_rate, handle); } @@ -94,13 +94,13 @@ void Init() { AddService(new IR_User_Interface); using Kernel::MemoryPermission; - shared_memory = SharedMemory::Create(nullptr, 0x1000, - Kernel::MemoryPermission::ReadWrite, Kernel::MemoryPermission::ReadWrite, - 0, Kernel::MemoryRegion::BASE, "IR:SharedMemory"); + shared_memory = SharedMemory::Create(nullptr, 0x1000, Kernel::MemoryPermission::ReadWrite, + Kernel::MemoryPermission::ReadWrite, 0, + Kernel::MemoryRegion::BASE, "IR:SharedMemory"); transfer_shared_memory = nullptr; // Create event handle(s) - handle_event = Event::Create(ResetType::OneShot, "IR:HandleEvent"); + handle_event = Event::Create(ResetType::OneShot, "IR:HandleEvent"); conn_status_event = Event::Create(ResetType::OneShot, "IR:ConnectionStatusEvent"); } |