1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-27 20:34:03 +00:00

Fix Quick Menu when used with joycons

This commit is contained in:
jugeeya 2023-01-04 17:10:58 -08:00
parent 4c65bf837d
commit e174daeb6f

View file

@ -218,6 +218,8 @@ pub static mut BUTTON_PRESSES: ButtonPresses = ButtonPresses {
pub fn handle_get_npad_state(state: *mut NpadGcState, _controller_id: *const u32) {
unsafe {
let update_count = (*state).updateCount;
let flags = (*state).Flags;
if QUICK_MENU_ACTIVE {
// TODO: This should make more sense, look into.
// BUTTON_PRESSES.a.is_pressed = (*state).Buttons & (1 << 0) > 0;
@ -261,6 +263,8 @@ pub fn handle_get_npad_state(state: *mut NpadGcState, _controller_id: *const u32
// If we're here, remove all other Npad presses...
// Should we exclude the home button?
(*state) = NpadGcState::default();
(*state).updateCount = update_count;
(*state).Flags = flags;
}
}
}