rui_screen_on_enter on_enter;
rui_screen_draw draw;
int screen_back;
+ int allow_force_reboot;
} rui_screen;
bool rui_init(rui_screen *screens, int screens_num, int current_screen,
bool volatile running = true;
-typedef enum {
- RECOVERY_RUI_SCREEN_FACTORY_RUN = 4,
-} recovery_rui_screen_id;
-
void recovery_rui_input_callback(user_action action, user_action_type action_type)
{
int need_repaint = 1;
rui_menu_cursor_down(cs->menu);
else if (action == ACTION_UP && cs->menu)
rui_menu_cursor_up(cs->menu);
- else if (get_current_screen_id() == RECOVERY_RUI_SCREEN_FACTORY_RUN &&
+ else if (cs->allow_force_reboot &&
action == ACTION_CONFIRM &&
action_type == ACTION_TYPE_LONGPRESS)
sys_power_reboot();
rui_config_labels.rui_animations);
screen->screen_back = get_screen_id(root, "screen_back");
+ config_setting_lookup_int(root, "allow_force_reboot", &screen->allow_force_reboot);
/*
screen->progress_bar = NULL;