This commit is contained in:
freakdave 2012-07-16 18:59:50 +02:00
commit f270b0a723

View File

@ -608,10 +608,10 @@ static void display_menubar(void)
gl_render_msg_post(gl);
}
uint64_t state, trigger_state, held_state;
uint64_t state, trigger_state;
uint16_t input_state, old_input_state = 0;
uint16_t trigger_st = 0;
static uint64_t old_state = 0;
static uint64_t older_state = 0;
static void control_update_wrap(void)
{
@ -658,9 +658,7 @@ static void control_update_wrap(void)
static void browser_update(filebrowser_t * b, const char *extensions)
{
control_update_wrap();
filebrowser_action_t action = FILEBROWSER_ACTION_NOOP;
uint16_t trigger_st = input_state & ~old_input_state;
if (trigger_st & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN))
action = FILEBROWSER_ACTION_DOWN;
@ -776,7 +774,6 @@ static void select_file(void)
}
browser_update(&tmpBrowser, extensions);
uint16_t trigger_st = input_state & ~old_input_state;
if (trigger_st & (1 << RETRO_DEVICE_ID_JOYPAD_B))
{
@ -1707,7 +1704,6 @@ static void select_rom(void)
gl_t * gl = driver.video_data;
browser_update(&browser, rarch_console_get_rom_ext());
uint16_t trigger_st = input_state & ~old_input_state;
menu_romselect_action_t action = MENU_ROMSELECT_ACTION_NOOP;
@ -2129,11 +2125,10 @@ void menu_loop(void)
state = cell_pad_input_poll_device(0);
trigger_state = state & ~old_state;
held_state = state & older_state;
held_state = held_state & old_state;
if(held_state)
{
//second button input
uint64_t held_state = cell_pad_input_poll_device(0);
bool analog_sticks_pressed = check_analog(held_state);
bool shoulder_buttons_pressed = check_shoulder_buttons(held_state) && menu_category_id != CATEGORY_SETTINGS;
bool do_held = analog_sticks_pressed || shoulder_buttons_pressed;
@ -2153,6 +2148,10 @@ void menu_loop(void)
}
}
control_update_wrap();
trigger_st = 0;
trigger_st = input_state & ~old_input_state;
gfx_ctx_clear();
if(menu_id == INGAME_MENU_RESIZE && CTRL_SQUARE(state) || menu_id == INGAME_MENU_SCREENSHOT)
@ -2220,7 +2219,6 @@ void menu_loop(void)
break;
}
older_state = old_state;
old_state = state;
if(IS_TIMER_EXPIRED(gl))