aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/hid/controllers/keyboard.cpp
diff options
context:
space:
mode:
authorLC <mathew1800@gmail.com>2020-10-20 22:08:53 -0400
committerGitHub <noreply@github.com>2020-10-20 22:08:53 -0400
commit2e74b79e89fe1e6a21fe0d8650844e563b3c32f5 (patch)
tree0dbc65ac86e609ae22087c7be9d4759ac6b73004 /src/core/hle/service/hid/controllers/keyboard.cpp
parentfdd91540695594c4b015f234325a950a5e6566e9 (diff)
parent3d592972dc3fd61cc88771b889eff237e4e03e0f (diff)
Merge pull request #4814 from yuzu-emu/revert-4796-clang
Revert "core: Fix clang build"
Diffstat (limited to 'src/core/hle/service/hid/controllers/keyboard.cpp')
-rw-r--r--src/core/hle/service/hid/controllers/keyboard.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/hle/service/hid/controllers/keyboard.cpp b/src/core/hle/service/hid/controllers/keyboard.cpp
index 0624be316..59b694cd4 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 = static_cast<s64>(core_timing.GetCPUTicks());
+ shared_memory.header.timestamp = core_timing.GetCPUTicks();
shared_memory.header.total_entry_count = 17;
if (!IsControllerActivated()) {
@@ -31,11 +31,9 @@ void Controller_Keyboard::OnUpdate(const Core::Timing::CoreTiming& core_timing,
}
shared_memory.header.entry_count = 16;
- const auto& last_entry =
- shared_memory.pad_states[static_cast<u64>(shared_memory.header.last_entry_index)];
+ const auto& last_entry = shared_memory.pad_states[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[static_cast<u64>(shared_memory.header.last_entry_index)];
+ auto& cur_entry = shared_memory.pad_states[shared_memory.header.last_entry_index];
cur_entry.sampling_number = last_entry.sampling_number + 1;
cur_entry.sampling_number2 = cur_entry.sampling_number;