void show_options_menu() { static char* headers[] = { "Extras", "or press DEL or POWER to return", "", NULL }; char* items[] = { "Custom Colors", "Disable OTA Update Downloads in ROM", "Show Battery Status", "Toggle Flashlight", "Activate Root Access in ROM", "Recovery Overclocking", "Toggle keyboard light", NULL }; #define COLORS 0 #define OTA 1 #define BATT 2 #define FLASHLIGHT 3 #define ROOT_MENU 4 #define OVERCLOCK 5 #define KEYLIGHT 6 int chosen_item = -1; while(chosen_item!=ITEM_BACK) { chosen_item = get_menu_selection(headers,items,1,chosen_item<0?0:chosen_item); switch (chosen_item) { case COLORS: show_colors_menu(); return; case OTA: disable_OTA(); break; case BATT: show_battstat(); break; case FLASHLIGHT: flashlight(); break; case ROOT_MENU: root_menu(ui_text_visible()); break; case OVERCLOCK: show_overclock_menu(); break; case KEYLIGHT: keylight(); break; } } }
int main(int argc, char *argv[]) { sys_handle_argv(argc, argv); #else int main(void) INIT_ATTR MAIN_NORETURN_ATTR; int main(void) { #endif int i; CHART(">init"); init(); CHART("<init"); FOR_NB_SCREENS(i) { screens[i].clear_display(); screens[i].update(); } #ifdef HAVE_LCD_BITMAP list_init(); #endif tree_gui_init(); /* Keep the order of this 3 * Must be done before any code uses the multi-screen API */ #ifdef HAVE_USBSTACK /* All threads should be created and public queues registered by now */ usb_start_monitoring(); #endif #ifdef AUTOROCK { char filename[MAX_PATH]; const char *file = #ifdef APPLICATION ROCKBOX_DIR #else PLUGIN_APPS_DIR #endif "/autostart.rock"; if(file_exists(file)) /* no complaint if it doesn't exist */ { plugin_load(file, NULL); /* start if it does */ } } #endif /* #ifdef AUTOROCK */ global_status.last_volume_change = 0; /* no calls INIT_ATTR functions after this point anymore! * see definition of INIT_ATTR in config.h */ CHART(">root_menu"); root_menu(); }