summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-04-17 22:33:08 +0200
committerGitHub <noreply@github.com>2020-04-17 22:33:08 +0200
commitb8f5c71f2d7f819821acf036175cce65ab1ae12c (patch)
tree151d7ed4e47536dc0e149a7117387b6a502d7da6 /src/core/hle/service/hid
parentMerge pull request #3682 from lioncash/uam (diff)
parentcore: hle: Address various feedback & code cleanup. (diff)
downloadyuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar
yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.gz
yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.bz2
yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.lz
yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.xz
yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.tar.zst
yuzu-b8f5c71f2d7f819821acf036175cce65ab1ae12c.zip
Diffstat (limited to 'src/core/hle/service/hid')
-rw-r--r--src/core/hle/service/hid/hid.cpp5
-rw-r--r--src/core/hle/service/hid/irs.cpp6
2 files changed, 5 insertions, 6 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index d6ed5f304..d6031a987 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -14,6 +14,7 @@
#include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/client_port.h"
#include "core/hle/kernel/client_session.h"
+#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/shared_memory.h"
#include "core/hle/kernel/writable_event.h"
@@ -53,9 +54,7 @@ IAppletResource::IAppletResource(Core::System& system)
RegisterHandlers(functions);
auto& kernel = system.Kernel();
- shared_mem = Kernel::SharedMemory::Create(
- kernel, nullptr, SHARED_MEMORY_SIZE, Kernel::MemoryPermission::ReadWrite,
- Kernel::MemoryPermission::Read, 0, Kernel::MemoryRegion::BASE, "HID:SharedMemory");
+ shared_mem = SharedFrom(&kernel.GetHidSharedMem());
MakeController<Controller_DebugPad>(HidController::DebugPad);
MakeController<Controller_Touchscreen>(HidController::Touchscreen);
diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp
index 5e79e2c1a..36ed6f7da 100644
--- a/src/core/hle/service/hid/irs.cpp
+++ b/src/core/hle/service/hid/irs.cpp
@@ -6,6 +6,7 @@
#include "core/core.h"
#include "core/core_timing.h"
#include "core/hle/ipc_helpers.h"
+#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/shared_memory.h"
#include "core/hle/service/hid/irs.h"
@@ -38,9 +39,8 @@ IRS::IRS(Core::System& system) : ServiceFramework{"irs"}, system(system) {
RegisterHandlers(functions);
auto& kernel = system.Kernel();
- shared_mem = Kernel::SharedMemory::Create(
- kernel, nullptr, 0x8000, Kernel::MemoryPermission::ReadWrite,
- Kernel::MemoryPermission::Read, 0, Kernel::MemoryRegion::BASE, "IRS:SharedMemory");
+
+ shared_mem = SharedFrom(&kernel.GetIrsSharedMem());
}
void IRS::ActivateIrsensor(Kernel::HLERequestContext& ctx) {