diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-05-27 20:50:57 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-05-27 20:50:57 +0200 |
commit | 3c47522e67ab80f69b29969ff2027cf5f8181c8c (patch) | |
tree | 17f8e8f42c181af07f34bfc21240b139890a34e4 /src/core | |
parent | Merge pull request #826 from lioncash/tables (diff) | |
parent | hid: Get rid of undefined behavior (diff) | |
download | yuzu-3c47522e67ab80f69b29969ff2027cf5f8181c8c.tar yuzu-3c47522e67ab80f69b29969ff2027cf5f8181c8c.tar.gz yuzu-3c47522e67ab80f69b29969ff2027cf5f8181c8c.tar.bz2 yuzu-3c47522e67ab80f69b29969ff2027cf5f8181c8c.tar.lz yuzu-3c47522e67ab80f69b29969ff2027cf5f8181c8c.tar.xz yuzu-3c47522e67ab80f69b29969ff2027cf5f8181c8c.tar.zst yuzu-3c47522e67ab80f69b29969ff2027cf5f8181c8c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 2d2133b2e..feac53816 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -58,7 +58,7 @@ void Update() { mem->pad.current_state.hex = state.hex; mem->pad.index = next_pad_index; - ++next_touch_index %= mem->pad.entries.size(); + next_touch_index = (next_touch_index + 1) % mem->pad.entries.size(); // Get the previous Pad state u32 last_entry_index = (mem->pad.index - 1) % mem->pad.entries.size(); @@ -88,7 +88,7 @@ void Update() { } mem->touch.index = next_touch_index; - ++next_touch_index %= mem->touch.entries.size(); + next_touch_index = (next_touch_index + 1) % mem->touch.entries.size(); // Get the current touch entry TouchDataEntry* touch_entry = &mem->touch.entries[mem->touch.index]; |