mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 03:11:16 +00:00
nyx: Keep last close button to a var
This commit is contained in:
parent
523c81f797
commit
7e96a4dd3a
6 changed files with 15 additions and 10 deletions
|
@ -119,7 +119,7 @@ void dump_packages12()
|
|||
sdmmc_storage_read(&storage, 0x180000 / NX_EMMC_BLOCKSIZE + kb, 1, keyblob);
|
||||
|
||||
// Decrypt.
|
||||
keygen(keyblob, kb, &tsec_ctxt, NULL);
|
||||
hos_keygen(keyblob, kb, &tsec_ctxt, NULL);
|
||||
if (kb <= KB_FIRMWARE_VERSION_600)
|
||||
h_cfg.se_keygen_done = 1;
|
||||
free(keyblob);
|
||||
|
|
|
@ -100,7 +100,7 @@ typedef struct _launch_ctxt_t
|
|||
bool exo_no_user_exceptions;
|
||||
bool exo_user_pmu;
|
||||
bool fss0_enable_experimental;
|
||||
bool emuMMC;
|
||||
bool emummc_forced;
|
||||
|
||||
ini_sec_t *cfg;
|
||||
} launch_ctxt_t;
|
||||
|
|
|
@ -468,7 +468,7 @@ lv_obj_t *nyx_create_standard_window(const char *win_title)
|
|||
lv_win_set_style(win, LV_WIN_STYLE_BG, &win_bg_style);
|
||||
lv_obj_set_size(win, LV_HOR_RES, LV_VER_RES);
|
||||
|
||||
lv_win_add_btn(win, NULL, SYMBOL_CLOSE" Close", lv_win_close_action);
|
||||
close_btn = lv_win_add_btn(win, NULL, SYMBOL_CLOSE" Close", lv_win_close_action);
|
||||
|
||||
return win;
|
||||
}
|
||||
|
@ -486,7 +486,7 @@ lv_obj_t *nyx_create_window_custom_close_btn(const char *win_title, lv_action_t
|
|||
lv_win_set_style(win, LV_WIN_STYLE_BG, &win_bg_style);
|
||||
lv_obj_set_size(win, LV_HOR_RES, LV_VER_RES);
|
||||
|
||||
lv_win_add_btn(win, NULL, SYMBOL_CLOSE" Close", rel_action);
|
||||
close_btn = lv_win_add_btn(win, NULL, SYMBOL_CLOSE" Close", rel_action);
|
||||
|
||||
return win;
|
||||
}
|
||||
|
@ -510,7 +510,7 @@ static void _launch_hos(u8 autoboot, u8 autoboot_list)
|
|||
(*main_ptr)();
|
||||
}
|
||||
|
||||
static void _reload_nyx()
|
||||
void reload_nyx()
|
||||
{
|
||||
b_cfg->boot_cfg = BOOT_CFG_AUTOBOOT_EN;
|
||||
b_cfg->autoboot = 0;
|
||||
|
@ -532,7 +532,7 @@ static void _reload_nyx()
|
|||
static lv_res_t reload_action(lv_obj_t *btns, const char *txt)
|
||||
{
|
||||
if (!lv_btnm_get_pressed(btns))
|
||||
_reload_nyx();
|
||||
reload_nyx();
|
||||
|
||||
return mbox_action(btns, txt);
|
||||
}
|
||||
|
@ -581,7 +581,7 @@ static void _check_sd_card_removed(void *params)
|
|||
|
||||
// If in reload state and card was inserted, reload nyx.
|
||||
if (do_reload && !sd_get_card_removed())
|
||||
_reload_nyx();
|
||||
reload_nyx();
|
||||
}
|
||||
|
||||
static lv_res_t _reboot_action(lv_obj_t *btns, const char *txt)
|
||||
|
@ -1017,7 +1017,7 @@ lv_obj_t *create_window_launch(const char *win_title)
|
|||
lv_win_set_style(win, LV_WIN_STYLE_BG, &win_bg_style);
|
||||
lv_obj_set_size(win, LV_HOR_RES, LV_VER_RES);
|
||||
|
||||
lv_win_add_btn(win, NULL, SYMBOL_CLOSE" Close", _win_launch_close_action);
|
||||
close_btn = lv_win_add_btn(win, NULL, SYMBOL_CLOSE" Close", _win_launch_close_action);
|
||||
|
||||
return win;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ lv_style_t monospace_text;
|
|||
|
||||
lv_obj_t *payload_list;
|
||||
lv_obj_t *autorcm_btn;
|
||||
lv_obj_t *close_btn;
|
||||
|
||||
lv_img_dsc_t *icon_switch;
|
||||
lv_img_dsc_t *icon_payload;
|
||||
|
@ -54,11 +55,14 @@ lv_style_t tabview_btn_pr, tabview_btn_tgl_pr;
|
|||
lv_style_t mbox_darken;
|
||||
|
||||
char *text_color;
|
||||
|
||||
void reload_nyx();
|
||||
lv_img_dsc_t *bmp_to_lvimg_obj(const char *path);
|
||||
lv_res_t mbox_action(lv_obj_t * btns, const char * txt);
|
||||
bool nyx_emmc_check_battery_enough();
|
||||
void nyx_window_toggle_buttons(lv_obj_t *win, bool disable);
|
||||
lv_obj_t *nyx_create_standard_window(const char *win_title);
|
||||
lv_obj_t *nyx_create_window_custom_close_btn(const char *win_title, lv_action_t rel_action);
|
||||
void nyx_create_onoff_button(lv_theme_t *th, lv_obj_t *parent, lv_obj_t *btn, const char *btn_name, lv_action_t action, bool transparent);
|
||||
lv_res_t nyx_generic_onoff_toggle(lv_obj_t *btn);
|
||||
void manual_system_maintenance(bool refresh);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "../utils/types.h"
|
||||
|
||||
extern hekate_config h_cfg;
|
||||
extern nyx_config n_cfg;
|
||||
|
||||
static lv_obj_t *autoboot_btn;
|
||||
static bool autoboot_first_time = true;
|
||||
|
@ -86,7 +87,7 @@ lv_obj_t *create_window_autoboot(const char *win_title)
|
|||
lv_win_set_style(win, LV_WIN_STYLE_BG, &win_bg_style);
|
||||
lv_obj_set_size(win, LV_HOR_RES, LV_VER_RES);
|
||||
|
||||
lv_win_add_btn(win, NULL, SYMBOL_CLOSE" Close", _win_autoboot_close_action);
|
||||
close_btn = lv_win_add_btn(win, NULL, SYMBOL_CLOSE" Close", _win_autoboot_close_action);
|
||||
|
||||
return win;
|
||||
}
|
||||
|
|
|
@ -416,7 +416,7 @@ static lv_res_t _create_window_dump_pk12_tool(lv_obj_t *btn)
|
|||
sdmmc_storage_read(&storage, 0x180000 / NX_EMMC_BLOCKSIZE + kb, 1, keyblob);
|
||||
|
||||
// Decrypt.
|
||||
keygen(keyblob, kb, &tsec_ctxt);
|
||||
hos_keygen(keyblob, kb, &tsec_ctxt);
|
||||
if (kb <= KB_FIRMWARE_VERSION_600)
|
||||
h_cfg.se_keygen_done = 1;
|
||||
free(keyblob);
|
||||
|
|
Loading…
Reference in a new issue