1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-22 18:06:40 +00:00

nyx: Utilize full shutdown based reboot for patched Erista also

This commit is contained in:
CTCaer 2020-12-02 22:27:22 +02:00
parent cf1f94662c
commit b8eff953c6

View file

@ -900,7 +900,7 @@ static lv_res_t _removed_sd_action(lv_obj_t *btns, const char *txt)
switch (btnidx) switch (btnidx)
{ {
case 0: case 0:
if (h_cfg.t210b01) if (h_cfg.rcm_patched)
reboot_full(); reboot_full();
else else
reboot_rcm(); reboot_rcm();
@ -954,13 +954,13 @@ static lv_res_t _reboot_action(lv_obj_t *btns, const char *txt)
switch (btnidx) switch (btnidx)
{ {
case 0: case 0:
if (h_cfg.t210b01) if (h_cfg.rcm_patched)
reboot_full(); reboot_full();
else else
reboot_normal(); reboot_normal();
break; break;
case 1: case 1:
if (h_cfg.t210b01) if (h_cfg.rcm_patched)
break; break;
reboot_rcm(); reboot_rcm();
break; break;
@ -1005,14 +1005,14 @@ static lv_res_t _create_mbox_reboot(lv_obj_t *btn)
lv_obj_set_size(dark_bg, LV_HOR_RES, LV_VER_RES); lv_obj_set_size(dark_bg, LV_HOR_RES, LV_VER_RES);
static const char * mbox_btn_map[] = { "\221OFW", "\221RCM", "\221Cancel", "" }; static const char * mbox_btn_map[] = { "\221OFW", "\221RCM", "\221Cancel", "" };
static const char * mbox_btn_map_t210b01[] = { "\221Reboot", "\221Cancel", "" }; static const char * mbox_btn_map_patched[] = { "\221Reboot", "\221Cancel", "" };
lv_obj_t *mbox = lv_mbox_create(dark_bg, NULL); lv_obj_t *mbox = lv_mbox_create(dark_bg, NULL);
lv_mbox_set_recolor_text(mbox, true); lv_mbox_set_recolor_text(mbox, true);
lv_obj_set_width(mbox, LV_HOR_RES / 2); lv_obj_set_width(mbox, LV_HOR_RES / 2);
lv_mbox_set_text(mbox, "#FF8000 Choose where to reboot:#"); lv_mbox_set_text(mbox, "#FF8000 Choose where to reboot:#");
lv_mbox_add_btns(mbox, h_cfg.t210b01 ? mbox_btn_map_t210b01 : mbox_btn_map, _reboot_action); lv_mbox_add_btns(mbox, h_cfg.rcm_patched ? mbox_btn_map_patched : mbox_btn_map, _reboot_action);
lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, 0); lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_top(mbox, true); lv_obj_set_top(mbox, true);