summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hid.cpp
diff options
context:
space:
mode:
authorarchshift <gh@archshift.com>2015-05-11 03:07:44 +0200
committerarchshift <gh@archshift.com>2015-05-11 03:07:44 +0200
commite98fbadf4a49eecc6d39c082cba683d5d88ea2c5 (patch)
tree7901b6ad673f8950d4f36d731eaa45b195cac763 /src/core/hle/service/hid/hid.cpp
parentMerge pull request #741 from Subv/tls (diff)
parentfixup! GSP: Small tweaks to shared memory initialization (diff)
downloadyuzu-e98fbadf4a49eecc6d39c082cba683d5d88ea2c5.tar
yuzu-e98fbadf4a49eecc6d39c082cba683d5d88ea2c5.tar.gz
yuzu-e98fbadf4a49eecc6d39c082cba683d5d88ea2c5.tar.bz2
yuzu-e98fbadf4a49eecc6d39c082cba683d5d88ea2c5.tar.lz
yuzu-e98fbadf4a49eecc6d39c082cba683d5d88ea2c5.tar.xz
yuzu-e98fbadf4a49eecc6d39c082cba683d5d88ea2c5.tar.zst
yuzu-e98fbadf4a49eecc6d39c082cba683d5d88ea2c5.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;