summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers/stubbed.cpp
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2022-04-19 22:30:32 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2022-04-23 22:41:42 +0200
commit61582efeb976b0852e73b734835d60c73b38f3cf (patch)
treeb5ac72746de0533cd292ad5cb962d0e663326b0e /src/core/hle/service/hid/controllers/stubbed.cpp
parentMerge pull request #8249 from german77/queued (diff)
downloadyuzu-61582efeb976b0852e73b734835d60c73b38f3cf.tar
yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.tar.gz
yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.tar.bz2
yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.tar.lz
yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.tar.xz
yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.tar.zst
yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.zip
Diffstat (limited to 'src/core/hle/service/hid/controllers/stubbed.cpp')
-rw-r--r--src/core/hle/service/hid/controllers/stubbed.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/hle/service/hid/controllers/stubbed.cpp b/src/core/hle/service/hid/controllers/stubbed.cpp
index 4d3b9d2be..df9ee0c3f 100644
--- a/src/core/hle/service/hid/controllers/stubbed.cpp
+++ b/src/core/hle/service/hid/controllers/stubbed.cpp
@@ -9,15 +9,18 @@
namespace Service::HID {
-Controller_Stubbed::Controller_Stubbed(Core::HID::HIDCore& hid_core_) : ControllerBase{hid_core_} {}
+Controller_Stubbed::Controller_Stubbed(Core::HID::HIDCore& hid_core_, u8* raw_shared_memory_)
+ : ControllerBase{hid_core_} {
+ raw_shared_memory = raw_shared_memory_;
+}
+
Controller_Stubbed::~Controller_Stubbed() = default;
void Controller_Stubbed::OnInit() {}
void Controller_Stubbed::OnRelease() {}
-void Controller_Stubbed::OnUpdate(const Core::Timing::CoreTiming& core_timing, u8* data,
- std::size_t size) {
+void Controller_Stubbed::OnUpdate(const Core::Timing::CoreTiming& core_timing) {
if (!smart_update) {
return;
}
@@ -28,7 +31,7 @@ void Controller_Stubbed::OnUpdate(const Core::Timing::CoreTiming& core_timing, u
header.entry_count = 0;
header.last_entry_index = 0;
- std::memcpy(data + common_offset, &header, sizeof(CommonHeader));
+ std::memcpy(raw_shared_memory + common_offset, &header, sizeof(CommonHeader));
}
void Controller_Stubbed::SetCommonHeaderOffset(std::size_t off) {