mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 10:42:47 +01:00
HID: Cleanup how next_touch_index
is calculated for Pad and touch.
This commit is contained in:
parent
432aa1044c
commit
a1a1a5c6c5
1 changed files with 2 additions and 2 deletions
|
@ -88,7 +88,7 @@ void PadUpdateComplete() {
|
||||||
|
|
||||||
shared_mem->pad.current_state.hex = next_state.hex;
|
shared_mem->pad.current_state.hex = next_state.hex;
|
||||||
shared_mem->pad.index = next_pad_index;
|
shared_mem->pad.index = next_pad_index;
|
||||||
next_pad_index = (next_pad_index + 1) % shared_mem->pad.entries.size();
|
++next_touch_index %= shared_mem->pad.entries.size();
|
||||||
|
|
||||||
// Get the previous Pad state
|
// Get the previous Pad state
|
||||||
u32 last_entry_index = (shared_mem->pad.index - 1) % shared_mem->pad.entries.size();
|
u32 last_entry_index = (shared_mem->pad.index - 1) % shared_mem->pad.entries.size();
|
||||||
|
@ -146,7 +146,7 @@ void TouchUpdateComplete() {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
shared_mem->touch.index = next_touch_index;
|
shared_mem->touch.index = next_touch_index;
|
||||||
next_touch_index = (next_touch_index + 1) % shared_mem->touch.entries.size();
|
++next_touch_index %= shared_mem->touch.entries.size();
|
||||||
|
|
||||||
// Get the current touch entry
|
// Get the current touch entry
|
||||||
TouchDataEntry* current_touch_entry = &shared_mem->touch.entries[shared_mem->touch.index];
|
TouchDataEntry* current_touch_entry = &shared_mem->touch.entries[shared_mem->touch.index];
|
||||||
|
|
Loading…
Reference in a new issue