void do_menu(void) { SceCtrlData pad; int selected = 0; unsigned int lastbut = TRIGGER; unsigned int curr = 0; redraw_menu(selected); while(1) { sceCtrlPeekBufferPositive(&pad, 1); curr = pad.Buttons & ~lastbut; if(curr & PSP_CTRL_UP) { if(selected > 0) { selected--; } else if(selected == 0) { selected = opt_count-1; } redraw_menu(selected); } if(curr & PSP_CTRL_DOWN) { if(selected < (opt_count-1)) { selected++; } else if(selected == (opt_count-1)) { selected = 0; } redraw_menu(selected); } if(curr & PSP_CTRL_CIRCLE) { options[selected].do_option(); } else if(curr & PSP_CTRL_CROSS) { return; } lastbut = pad.Buttons; if(sceDisplayWaitVblankStart() < 0) { sceKernelExitDeleteThread(0); } } }
void menu_redraw(void) { was_redraw = 1; redraw_menu(menu); if(curr_stats.errmsg_shown) { redraw_error_msg_window(); redrawwin(error_win); wnoutrefresh(error_win); doupdate(); } }
void menu_redraw(void) { was_redraw = 1; redraw_menu(menu); }
void menus_reset_search_highlight(menu_state_t *m) { m->search_highlight = 0; redraw_menu(m); }
static void cmd_ctrl_l(key_info_t key_info, keys_info_t *keys_info) { redraw_menu(menu); }