mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-24 02:44:17 +00:00
Some Quick Menu fixes
This commit is contained in:
parent
491b8f975f
commit
42ab764757
2 changed files with 11 additions and 2 deletions
|
@ -217,10 +217,15 @@ pub fn handle_get_npad_state(state: *mut NpadGcState, _controller_id: *const u32
|
|||
// BUTTON_PRESSES.right.is_pressed = (*state).Buttons & ((1 << 14) | (1 << 18)) > 0;
|
||||
// BUTTON_PRESSES.down.is_pressed = (*state).Buttons & ((1 << 15) | (1 << 19)) > 0;
|
||||
// BUTTON_PRESSES.up.is_pressed = (*state).Buttons & ((1 << 13) | (1 << 17)) > 0;
|
||||
|
||||
if frame_counter::get_frame_count(FRAME_COUNTER_INDEX) != 0 {
|
||||
return;
|
||||
}
|
||||
|
||||
if (*state).Buttons & (1 << 0) > 0 {
|
||||
BUTTON_PRESSES.a.is_pressed = true;
|
||||
}
|
||||
if (*state).Buttons & (1 << 1) > 0 && frame_counter::get_frame_count(FRAME_COUNTER_INDEX) == 0 {
|
||||
if (*state).Buttons & (1 << 1) > 0 {
|
||||
BUTTON_PRESSES.b.is_pressed = true;
|
||||
}
|
||||
if (*state).Buttons & (1 << 8) > 0 {
|
||||
|
|
|
@ -139,6 +139,10 @@ pub fn main() {
|
|||
log!("No previous menu defaults found.");
|
||||
}
|
||||
|
||||
if is_emulator() {
|
||||
unsafe { MENU.quick_menu = OnOff::On; }
|
||||
}
|
||||
|
||||
std::thread::spawn(|| loop {
|
||||
std::thread::sleep(std::time::Duration::from_secs(10));
|
||||
unsafe {
|
||||
|
@ -183,7 +187,7 @@ pub fn main() {
|
|||
}
|
||||
});
|
||||
button_presses.zl.read_press().then(|| app.on_l());
|
||||
button_presses.zl.read_press().then(|| app.on_r());
|
||||
button_presses.zr.read_press().then(|| app.on_r());
|
||||
button_presses.left.read_press().then(|| app.on_left());
|
||||
button_presses.right.read_press().then(|| app.on_right());
|
||||
button_presses.up.read_press().then(|| app.on_up());
|
||||
|
|
Loading…
Reference in a new issue