mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Kill off some console-only hacks to do with lifecycle state
This commit is contained in:
parent
c09cc19cfe
commit
954121b99c
@ -519,7 +519,7 @@ static unsigned default_menu_btn_info = RETRO_DEVICE_ID_JOYPAD_SELECT;
|
||||
static unsigned default_menu_btn_scroll_down = RETRO_DEVICE_ID_JOYPAD_R;
|
||||
static unsigned default_menu_btn_scroll_up = RETRO_DEVICE_ID_JOYPAD_L;
|
||||
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#if defined(__CELLOS_LV2__) || defined(_XBOX1) || defined(_XBOX360)
|
||||
static unsigned menu_toggle_gamepad_combo = 2;
|
||||
#else
|
||||
static unsigned menu_toggle_gamepad_combo = 0;
|
||||
|
@ -915,13 +915,12 @@ static bool android_input_key_pressed(void *data, int key)
|
||||
{
|
||||
android_input_t *android = (android_input_t*)data;
|
||||
driver_t *driver = driver_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!android)
|
||||
return false;
|
||||
|
||||
return ((global->lifecycle_state | driver->overlay_state.buttons)
|
||||
return (driver->overlay_state.buttons
|
||||
& (1ULL << key)) || input_joypad_pressed(android->joypad,
|
||||
0, settings->input.binds[0], key);
|
||||
}
|
||||
|
@ -178,13 +178,11 @@ static bool ps3_input_key_pressed(void *data, int key)
|
||||
{
|
||||
ps3_input_t *ps3 = (ps3_input_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
if (!ps3)
|
||||
return false;
|
||||
|
||||
return (global->lifecycle_state & (1ULL << key)) ||
|
||||
input_joypad_pressed(ps3->joypad, 0, settings->input.binds[0], key);
|
||||
return input_joypad_pressed(ps3->joypad, 0, settings->input.binds[0], key);
|
||||
}
|
||||
|
||||
static uint64_t ps3_input_get_capabilities(void *data)
|
||||
|
@ -674,11 +674,8 @@ static void *qnx_input_init(void)
|
||||
|
||||
static void qnx_input_poll(void *data)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
qnx_input_t *qnx = (qnx_input_t*)data;
|
||||
|
||||
global->lifecycle_state &= ~(1ULL << RARCH_MENU_TOGGLE);
|
||||
|
||||
/* Request and process all available BPS events. */
|
||||
|
||||
while(true)
|
||||
@ -795,9 +792,8 @@ static bool qnx_input_key_pressed(void *data, int key)
|
||||
{
|
||||
qnx_input_t *qnx = (qnx_input_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
return ((global->lifecycle_state | driver.overlay_state.buttons ) & (1ULL << key) ||
|
||||
return (driver.overlay_state.buttons & (1ULL << key) ||
|
||||
input_joypad_pressed(qnx->joypad, 0, settings->input.binds[0], key));
|
||||
}
|
||||
|
||||
|
@ -92,10 +92,8 @@ static bool xdk_input_key_pressed(void *data, int key)
|
||||
{
|
||||
xdk_input_t *xdk = (xdk_input_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
return (global->lifecycle_state & (1ULL << key)) ||
|
||||
input_joypad_pressed(xdk->joypad, 0, settings->input.binds[0], key);
|
||||
return input_joypad_pressed(xdk->joypad, 0, settings->input.binds[0], key);
|
||||
}
|
||||
|
||||
static uint64_t xdk_input_get_capabilities(void *data)
|
||||
|
@ -125,7 +125,6 @@ static void ps3_joypad_poll(void)
|
||||
unsigned port;
|
||||
CellPadInfo2 pad_info;
|
||||
global_t *global = global_get_ptr();
|
||||
uint64_t *lifecycle_state = (uint64_t*)&global->lifecycle_state;
|
||||
|
||||
cellPadGetInfo2(&pad_info);
|
||||
|
||||
@ -229,15 +228,6 @@ static void ps3_joypad_poll(void)
|
||||
if (analog_state[port][i][j] == -0x8000)
|
||||
analog_state[port][i][j] = -0x7fff;
|
||||
}
|
||||
|
||||
uint64_t *state_p1 = &pad_state[0];
|
||||
|
||||
*lifecycle_state &= ~((1ULL << RARCH_MENU_TOGGLE));
|
||||
|
||||
if ((*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
static bool ps3_joypad_query_pad(unsigned pad)
|
||||
|
@ -135,8 +135,6 @@ static void xdk_joypad_poll(void)
|
||||
#ifdef _XBOX1
|
||||
unsigned int dwInsertions, dwRemovals;
|
||||
#endif
|
||||
uint64_t *state_p1 = NULL;
|
||||
uint64_t *lifecycle_state = NULL;
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
#if defined(_XBOX1)
|
||||
@ -247,14 +245,6 @@ static void xdk_joypad_poll(void)
|
||||
if (analog_state[port][i][j] == -0x8000)
|
||||
analog_state[port][i][j] = -0x7fff;
|
||||
}
|
||||
|
||||
state_p1 = &pad_state[0];
|
||||
lifecycle_state = &global->lifecycle_state;
|
||||
|
||||
*lifecycle_state &= ~((1ULL << RARCH_MENU_TOGGLE));
|
||||
|
||||
if((*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_L3)) && (*state_p1 & (1ULL << RETRO_DEVICE_ID_JOYPAD_R3)))
|
||||
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
|
||||
}
|
||||
|
||||
static bool xdk_joypad_query_pad(unsigned pad)
|
||||
|
Loading…
Reference in New Issue
Block a user