summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers/touchscreen.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-10-15 20:49:45 +0200
committerLioncash <mathew1800@gmail.com>2020-10-18 01:50:39 +0200
commitbe1954e04cb5a0c3a526f78ed5490a5e65310280 (patch)
tree267db7ae4be88dbbc288fa605e35d4a2a13839f6 /src/core/hle/service/hid/controllers/touchscreen.cpp
parentMerge pull request #4787 from lioncash/conversion (diff)
downloadyuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.gz
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.bz2
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.lz
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.xz
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.zst
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/hid/controllers/touchscreen.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp
index 0df395e85..06f4134a2 100644
--- a/src/core/hle/service/hid/controllers/touchscreen.cpp
+++ b/src/core/hle/service/hid/controllers/touchscreen.cpp
@@ -22,7 +22,7 @@ void Controller_Touchscreen::OnRelease() {}
void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timing, u8* data,
std::size_t size) {
- shared_memory.header.timestamp = core_timing.GetCPUTicks();
+ shared_memory.header.timestamp = static_cast<s64>(core_timing.GetCPUTicks());
shared_memory.header.total_entry_count = 17;
if (!IsControllerActivated()) {
@@ -33,9 +33,12 @@ void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timin
shared_memory.header.entry_count = 16;
const auto& last_entry =
- shared_memory.shared_memory_entries[shared_memory.header.last_entry_index];
+ shared_memory
+ .shared_memory_entries[static_cast<u64>(shared_memory.header.last_entry_index)];
shared_memory.header.last_entry_index = (shared_memory.header.last_entry_index + 1) % 17;
- auto& cur_entry = shared_memory.shared_memory_entries[shared_memory.header.last_entry_index];
+ auto& cur_entry =
+ shared_memory
+ .shared_memory_entries[static_cast<u64>(shared_memory.header.last_entry_index)];
cur_entry.sampling_number = last_entry.sampling_number + 1;
cur_entry.sampling_number2 = cur_entry.sampling_number;