diff options
| author | Lioncash <mathew1800@gmail.com> | 2020-10-15 14:49:45 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2020-10-17 19:50:39 -0400 |
| commit | be1954e04cb5a0c3a526f78ed5490a5e65310280 (patch) | |
| tree | 267db7ae4be88dbbc288fa605e35d4a2a13839f6 /src/core/hle/service/hid/controllers/keyboard.cpp | |
| parent | ca416a0fb87ced0e471729fe344b9f34a090e7b5 (diff) | |
core: Fix clang build
Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.
Fixes #4795
Diffstat (limited to 'src/core/hle/service/hid/controllers/keyboard.cpp')
| -rw-r--r-- | src/core/hle/service/hid/controllers/keyboard.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/service/hid/controllers/keyboard.cpp b/src/core/hle/service/hid/controllers/keyboard.cpp index 59b694cd4..0624be316 100644 --- a/src/core/hle/service/hid/controllers/keyboard.cpp +++ b/src/core/hle/service/hid/controllers/keyboard.cpp @@ -21,7 +21,7 @@ void Controller_Keyboard::OnRelease() {} void Controller_Keyboard::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()) { @@ -31,9 +31,11 @@ void Controller_Keyboard::OnUpdate(const Core::Timing::CoreTiming& core_timing, } shared_memory.header.entry_count = 16; - const auto& last_entry = shared_memory.pad_states[shared_memory.header.last_entry_index]; + const auto& last_entry = + shared_memory.pad_states[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.pad_states[shared_memory.header.last_entry_index]; + auto& cur_entry = + shared_memory.pad_states[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; |
