mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(GX) Menu button toggle should work again
This commit is contained in:
parent
01ce2eaf31
commit
23348f41ac
@ -33,6 +33,8 @@
|
||||
#define MAX_PADS 4
|
||||
#endif
|
||||
|
||||
uint64_t lifecycle_state;
|
||||
|
||||
typedef struct gx_input
|
||||
{
|
||||
bool blocked;
|
||||
@ -95,7 +97,8 @@ static bool gx_input_key_pressed(void *data, int key)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
gx_input_t *gx = (gx_input_t*)data;
|
||||
return input_joypad_pressed(gx->joypad, 0, settings->input.binds[0], key);
|
||||
return (BIT64_GET(lifecycle_state, key)) ||
|
||||
input_joypad_pressed(gx->joypad, 0, settings->input.binds[0], key);
|
||||
}
|
||||
|
||||
static uint64_t gx_input_get_capabilities(void *data)
|
||||
|
@ -114,7 +114,7 @@ enum
|
||||
#define GC_JOYSTICK_THRESHOLD (48 * 256)
|
||||
#define WII_JOYSTICK_THRESHOLD (40 * 256)
|
||||
|
||||
static uint64_t lifecycle_state;
|
||||
extern uint64_t lifecycle_state;
|
||||
static uint64_t pad_state[MAX_PADS];
|
||||
static uint32_t pad_type[MAX_PADS] = { WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER };
|
||||
static int16_t analog_state[MAX_PADS][2][2];
|
||||
@ -201,8 +201,7 @@ static bool gx_joypad_button(unsigned port, uint16_t key)
|
||||
{
|
||||
if (port >= MAX_PADS)
|
||||
return false;
|
||||
return (lifecycle_state & (UINT64_C(1) << key)) ||
|
||||
(pad_state[port] & (UINT64_C(1) << key));
|
||||
return (pad_state[port] & (UINT64_C(1) << key));
|
||||
}
|
||||
|
||||
static uint64_t gx_joypad_get_buttons(unsigned port)
|
||||
@ -542,7 +541,8 @@ static void gx_joypad_poll(void)
|
||||
|
||||
uint64_t *state_p1 = &pad_state[0];
|
||||
|
||||
lifecycle_state &= ~((UINT64_C(1) << RARCH_MENU_TOGGLE));
|
||||
|
||||
BIT64_CLEAR(lifecycle_state, RARCH_MENU_TOGGLE);
|
||||
|
||||
if (g_menu)
|
||||
{
|
||||
@ -555,7 +555,7 @@ static void gx_joypad_poll(void)
|
||||
| (UINT64_C(1) << GX_CLASSIC_HOME)
|
||||
#endif
|
||||
))
|
||||
lifecycle_state |= (UINT64_C(1) << RARCH_MENU_TOGGLE);
|
||||
BIT64_SET(lifecycle_state, RARCH_MENU_TOGGLE);
|
||||
}
|
||||
|
||||
static bool gx_joypad_init(void *data)
|
||||
|
Loading…
x
Reference in New Issue
Block a user