diff options
author | neonloop | 2021-04-03 23:13:51 +0000 |
---|---|---|
committer | neonloop | 2021-04-03 23:13:51 +0000 |
commit | 67c4ecd9a17491c102cdc8e5d08b22ab422826c8 (patch) | |
tree | cdf5b1f2f0554b2ec98b0d6444fbec841968ddaa /frontend/main.h | |
parent | 076eba28b80edeb7566d8e12713b029bd324a67b (diff) | |
download | pcsx_rearmed-67c4ecd9a17491c102cdc8e5d08b22ab422826c8.tar.gz pcsx_rearmed-67c4ecd9a17491c102cdc8e5d08b22ab422826c8.tar.bz2 pcsx_rearmed-67c4ecd9a17491c102cdc8e5d08b22ab422826c8.zip |
Enables Menu+L1/R1 for L2/R2 and vice versa
The menu now appears when releasing the button as long as another
button hasn't been pressed. Menu+L will activate L2 if L1 is bound to
L, or L1 if L2 is bound to L. This allows rebinding for games that
prefer L2/R2, like Twisted Metal 2.
Diffstat (limited to 'frontend/main.h')
-rw-r--r-- | frontend/main.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/frontend/main.h b/frontend/main.h index b53a2a3..56f555c 100644 --- a/frontend/main.h +++ b/frontend/main.h @@ -83,11 +83,27 @@ enum sched_action { #define SACTION_GUN_MASK (0x0f << SACTION_GUN_TRIGGER) +#ifdef MENU_SHOULDER_COMBO +int emu_menu_press; +int emu_menu_cancel; +#endif + static inline void emu_set_action(enum sched_action action_) { extern enum sched_action emu_action, emu_action_old; extern int stop; +#ifdef MENU_SHOULDER_COMBO + if (action_ == SACTION_NONE) { + if (emu_menu_press && !emu_menu_cancel) + action_ = SACTION_ENTER_MENU; + emu_menu_press = 0; + emu_menu_cancel = 0; + } else if (action_ == SACTION_ENTER_MENU) { + emu_menu_press = 1; + action_ = SACTION_NONE; + } +#endif if (action_ == SACTION_NONE) emu_action_old = 0; else if (action_ != emu_action_old) |