mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-24 02:44:17 +00:00
Fix issue where you could not control the "select fighter with controller" menu when the quick menu is up.
This commit is contained in:
parent
3d6ea34eeb
commit
0c64959333
1 changed files with 11 additions and 1 deletions
|
@ -3,7 +3,7 @@ use crate::events::{Event, EVENT_QUEUE};
|
|||
use crate::logging::*;
|
||||
use crate::training::frame_counter;
|
||||
|
||||
use skyline::nn::hid::NpadGcState;
|
||||
use skyline::nn::hid::{GetNpadStyleSet, NpadGcState};
|
||||
use training_mod_consts::MenuJsonStruct;
|
||||
|
||||
static mut FRAME_COUNTER_INDEX: usize = 0;
|
||||
|
@ -261,6 +261,16 @@ pub unsafe fn quick_menu_loop() {
|
|||
continue;
|
||||
}
|
||||
|
||||
// Check for all controllers unplugged
|
||||
let mut potential_controller_ids = (0..8).collect::<Vec<u32>>();
|
||||
potential_controller_ids.push(0x20);
|
||||
if potential_controller_ids
|
||||
.iter()
|
||||
.all(|i| GetNpadStyleSet(i as *const _).flags == 0) {
|
||||
QUICK_MENU_ACTIVE = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
let app = &mut *QUICK_MENU_APP.data_ptr();
|
||||
button_presses.a.read_press().then(|| {
|
||||
app.on_a();
|
||||
|
|
Loading…
Reference in a new issue