(GX) fix input quirks

This commit is contained in:
ToadKing 2013-01-06 18:47:36 -05:00
parent 466acac261
commit dc92db11a3
2 changed files with 16 additions and 18 deletions

View File

@ -274,7 +274,7 @@ static bool folder_cb(const char *directory, rgui_file_enum_cb_t file_cb,
static bool rmenu_iterate(void)
{
static uint16_t old_input_state = 0;
bool initial_held = true;
static bool initial_held = true;
static bool first_held = false;
g_extern.draw_menu = true;
@ -355,9 +355,7 @@ static bool rmenu_iterate(void)
case MODE_EMULATION:
break;
default:
if (quit_key_pressed)
g_extern.console.rmenu.mode = MODE_EXIT;
g_extern.console.rmenu.mode = rmenu_enable ? MODE_EMULATION : MODE_MENU;
g_extern.console.rmenu.mode = quit_key_pressed ? MODE_EXIT : rmenu_enable ? MODE_EMULATION : MODE_MENU;
break;
}
}

View File

@ -385,10 +385,7 @@ static void gx_input_poll(void *data)
}
#endif
u32 gc_pads_connected = PAD_ScanPads();
if (!gc_pads_connected)
goto do_exit;
PAD_ScanPads();
for (unsigned port = 0; port < MAX_PADS; port++)
{
@ -448,17 +445,20 @@ do_exit:
g_quit = false;
}
if (pad_state[0] & GX_QUIT_KEY)
g_extern.lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
if (pad_state[0] & (GX_WIIMOTE_HOME
#ifdef HW_RVL
| GX_CLASSIC_HOME
#endif
))
if (IS_TIMER_EXPIRED(0))
{
g_extern.lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE);
g_extern.lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
if (pad_state[0] & GX_QUIT_KEY)
g_extern.lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
if (pad_state[0] & (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);
}
}
}