mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2025-02-26 02:50:23 +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 {
|
if delayed_states.len() < MENU.input_delay.into_delay() as usize {
|
||||||
let update_count = (*state).updateCount;
|
let update_count = (*state).updateCount;
|
||||||
|
let attributes = (*state).Flags;
|
||||||
*state = NpadGcState::default();
|
*state = NpadGcState::default();
|
||||||
(*state).updateCount = update_count;
|
(*state).updateCount = update_count;
|
||||||
|
(*state).Flags = attributes;
|
||||||
} else if let Some(delayed_state) = delayed_states.back() {
|
} else if let Some(delayed_state) = delayed_states.back() {
|
||||||
let update_count = (*state).updateCount;
|
let update_count = (*state).updateCount;
|
||||||
|
let attributes = (*state).Flags;
|
||||||
*state = *delayed_state;
|
*state = *delayed_state;
|
||||||
(*state).updateCount = update_count;
|
(*state).updateCount = update_count;
|
||||||
|
(*state).Flags = attributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
delayed_states.push_front(actual_state);
|
delayed_states.push_front(actual_state);
|
||||||
|
|
Loading…
Add table
Reference in a new issue