summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hid.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-05-11 00:47:07 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-05-11 00:47:07 +0200
commitc96f22490a4a459d477f446fd4e5f894f580b69c (patch)
tree3047a04a88ecd381f2e2984b41b2fb21119940d9 /src/core/hle/service/hid/hid.cpp
parentMerge pull request #736 from yuriks/remove-BIT (diff)
downloadyuzu-c96f22490a4a459d477f446fd4e5f894f580b69c.tar
yuzu-c96f22490a4a459d477f446fd4e5f894f580b69c.tar.gz
yuzu-c96f22490a4a459d477f446fd4e5f894f580b69c.tar.bz2
yuzu-c96f22490a4a459d477f446fd4e5f894f580b69c.tar.lz
yuzu-c96f22490a4a459d477f446fd4e5f894f580b69c.tar.xz
yuzu-c96f22490a4a459d477f446fd4e5f894f580b69c.tar.zst
yuzu-c96f22490a4a459d477f446fd4e5f894f580b69c.zip
Diffstat (limited to 'src/core/hle/service/hid/hid.cpp')
-rw-r--r--src/core/hle/service/hid/hid.cpp6
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;