nyx: Disallow eMMC ops with low battery

This commit is contained in:
CTCaer
2020-04-30 03:59:16 +03:00
parent e89b7f12dd
commit f540c8250b
4 changed files with 40 additions and 0 deletions

View File

@@ -177,6 +177,9 @@ static void _create_window_backup_restore(emmcPartType_t type, const char* win_l
static lv_res_t _emmc_backup_buttons_decider(lv_obj_t *btn)
{
if (!nyx_emmc_check_battery_enough())
return LV_RES_OK;
char *win_label = lv_label_get_text(lv_obj_get_child(btn, NULL));
if (emmc_btn_ctxt.emmc_boot == btn)