mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-24 10:54:16 +00:00
Keep attributes for delayed input (#390)
This commit is contained in:
parent
43b516aa56
commit
0b99a611e3
1 changed files with 4 additions and 0 deletions
|
@ -31,12 +31,16 @@ pub fn handle_get_npad_state(state: *mut NpadGcState, controller_id: *const u32)
|
|||
|
||||
if delayed_states.len() < MENU.input_delay.into_delay() as usize {
|
||||
let update_count = (*state).updateCount;
|
||||
let attributes = (*state).Flags;
|
||||
*state = NpadGcState::default();
|
||||
(*state).updateCount = update_count;
|
||||
(*state).Flags = attributes;
|
||||
} else if let Some(delayed_state) = delayed_states.back() {
|
||||
let update_count = (*state).updateCount;
|
||||
let attributes = (*state).Flags;
|
||||
*state = *delayed_state;
|
||||
(*state).updateCount = update_count;
|
||||
(*state).Flags = attributes;
|
||||
}
|
||||
|
||||
delayed_states.push_front(actual_state);
|
||||
|
|
Loading…
Reference in a new issue