diff options
Diffstat (limited to 'src/core/hle/service/hid/hid.cpp')
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index dd85848d0..9695f7e56 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -48,7 +48,7 @@ static u32 next_touch_index; // * Set PadData.current_state.circle_right = 1 if current PadEntry.circle_pad_y <= -41 void Update() { - SharedMem* mem = reinterpret_cast<SharedMem*>(shared_mem->GetPointer().ValueOr(nullptr)); + SharedMem* mem = reinterpret_cast<SharedMem*>(shared_mem->GetPointer()); const PadState state = VideoCore::g_emu_window->GetPadState(); if (mem == nullptr) { @@ -163,7 +163,9 @@ void Init() { AddService(new HID_U_Interface); AddService(new HID_SPVR_Interface); - shared_mem = SharedMemory::Create("HID:SharedMem"); + using Kernel::MemoryPermission; + shared_mem = SharedMemory::Create(0x1000, MemoryPermission::ReadWrite, + MemoryPermission::Read, "HID:SharedMem"); next_pad_index = 0; next_touch_index = 0; |