1
0
Fork 0
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:
GradualSyrup 2022-10-09 19:14:07 -05:00 committed by GitHub
parent 43b516aa56
commit 0b99a611e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);