diff options
author | Lioncash <mathew1800@gmail.com> | 2020-10-15 20:49:45 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-10-18 01:50:39 +0200 |
commit | be1954e04cb5a0c3a526f78ed5490a5e65310280 (patch) | |
tree | 267db7ae4be88dbbc288fa605e35d4a2a13839f6 /src/core/hle/service/hid/controllers/xpad.cpp | |
parent | Merge pull request #4787 from lioncash/conversion (diff) | |
download | yuzu-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/xpad.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/service/hid/controllers/xpad.cpp b/src/core/hle/service/hid/controllers/xpad.cpp index 2503ef241..60417abb8 100644 --- a/src/core/hle/service/hid/controllers/xpad.cpp +++ b/src/core/hle/service/hid/controllers/xpad.cpp @@ -20,7 +20,7 @@ void Controller_XPad::OnRelease() {} void Controller_XPad::OnUpdate(const Core::Timing::CoreTiming& core_timing, u8* data, std::size_t size) { for (auto& xpad_entry : shared_memory.shared_memory_entries) { - xpad_entry.header.timestamp = core_timing.GetCPUTicks(); + xpad_entry.header.timestamp = static_cast<s64>(core_timing.GetCPUTicks()); xpad_entry.header.total_entry_count = 17; if (!IsControllerActivated()) { @@ -30,9 +30,11 @@ void Controller_XPad::OnUpdate(const Core::Timing::CoreTiming& core_timing, u8* } xpad_entry.header.entry_count = 16; - const auto& last_entry = xpad_entry.pad_states[xpad_entry.header.last_entry_index]; + const auto& last_entry = + xpad_entry.pad_states[static_cast<u64>(xpad_entry.header.last_entry_index)]; xpad_entry.header.last_entry_index = (xpad_entry.header.last_entry_index + 1) % 17; - auto& cur_entry = xpad_entry.pad_states[xpad_entry.header.last_entry_index]; + auto& cur_entry = + xpad_entry.pad_states[static_cast<u64>(xpad_entry.header.last_entry_index)]; cur_entry.sampling_number = last_entry.sampling_number + 1; cur_entry.sampling_number2 = cur_entry.sampling_number; |