(Android) Input tweaks - use local pointer variables

This commit is contained in:
twinaphex 2013-01-07 02:09:19 +01:00
parent 31e82fa6e8
commit 4866aff654

View File

@ -431,34 +431,37 @@ static void gx_input_poll(void *data)
*state_cur |= GX_WIIMOTE_HOME;
}
g_extern.lifecycle_state &= ~((1ULL << RARCH_FAST_FORWARD_HOLD_KEY) | (1ULL << RARCH_LOAD_STATE_KEY) | (1ULL << RARCH_SAVE_STATE_KEY) | (1ULL << RARCH_STATE_SLOT_PLUS) | (1ULL << RARCH_STATE_SLOT_MINUS) | (1ULL << RARCH_REWIND)
uint64_t *lifecycle_state = &g_extern.lifecycle_state;
uint64_t *pad_p1 = &pad_state[0];
*lifecycle_state &= ~((1ULL << RARCH_FAST_FORWARD_HOLD_KEY) | (1ULL << RARCH_LOAD_STATE_KEY) | (1ULL << RARCH_SAVE_STATE_KEY) | (1ULL << RARCH_STATE_SLOT_PLUS) | (1ULL << RARCH_STATE_SLOT_MINUS) | (1ULL << RARCH_REWIND)
| (1ULL << RARCH_QUIT_KEY) | (1ULL << RARCH_RMENU_TOGGLE) | (1ULL << RARCH_RMENU_QUICKMENU_TOGGLE));
if (g_menu)
{
pad_state[0] |= GX_WIIMOTE_HOME;
*pad_p1 |= GX_WIIMOTE_HOME;
g_menu = false;
}
if (g_quit)
{
pad_state[0] |= GX_QUIT_KEY;
*pad_p1 |= GX_QUIT_KEY;
g_quit = false;
}
if (IS_TIMER_EXPIRED(0))
{
if (pad_state[0] & GX_QUIT_KEY)
g_extern.lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
if (*pad_p1 & GX_QUIT_KEY)
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
if (pad_state[0] & (GX_WIIMOTE_HOME
if (*pad_p1 & (GX_WIIMOTE_HOME
#ifdef HW_RVL
| GX_CLASSIC_HOME
#endif
))
{
g_extern.lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
g_extern.lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
*lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
}
}
}