From 45318f691fa09892469da888b5e5a986143281ab Mon Sep 17 00:00:00 2001 From: NaGa Date: Sat, 28 Mar 2026 01:42:43 +0100 Subject: [PATCH] . --- bdk/display/di.h | 16 +++- bdk/storage/sd.c | 2 +- bootloader/hos/hos.c | 2 - bootloader/main.c | 2 +- nyx/nyx_gui/frontend/fe_emusd_tools.c | 2 +- nyx/nyx_gui/frontend/gui.c | 10 +-- nyx/nyx_gui/frontend/gui_emu_tools.c | 2 +- nyx/nyx_gui/frontend/gui_emummc_tools.c | 25 ++++--- nyx/nyx_gui/frontend/gui_emusd_tools.c | 22 +++--- nyx/nyx_gui/frontend/gui_info.c | 75 +++++++++++++++++++ nyx/nyx_gui/frontend/gui_options.c | 2 +- nyx/nyx_gui/frontend/gui_tools.c | 2 +- .../frontend/gui_tools_partition_manager.c | 63 +++++++--------- nyx/nyx_gui/nyx.c | 2 +- 14 files changed, 152 insertions(+), 75 deletions(-) diff --git a/bdk/display/di.h b/bdk/display/di.h index 66eaa9ad..ead341cc 100644 --- a/bdk/display/di.h +++ b/bdk/display/di.h @@ -808,7 +808,10 @@ * [30] 97 [0F]: AUO A062TAN02 (59.06A33.002) [From photo of assumed same panel] * [30] 98 [0F]: AUO A062TAN0? [UNCONFIRMED MODEL] * [30] XX [0F]: AUO A062TAN03 (59.06A33.003) [UNCONFIRMED ID] - * + * [E0] 01 [0F]: Retro Remake SUPER7 IPS (Rev 01) + * [E1] 01 [0F]: Retro Remake SUPER7 IPS HD (Rev 01) + * [E0] 11 [0F]: Retro Remake SUPER7 OLED (Rev 01) + * [E1] 11 [0F]: Retro Remake SUPER7 OLED HD (Rev 01) * * 5.5" panels for Hoag SKU: * [20] 94 [10]: InnoLux 2J055IA-27A (Rev B1) (6203B001P4000) @@ -818,10 +821,13 @@ * [30] 94 [10]: AUO A055TAN02 (59.05A30.002) * [30] 95 [10]: AUO A055TAN03 (59.05A30.003) * [40] 94 [10]: Sharp LQ055T1SW10 (Rev P) - * + * [E0] 01 [10]: Retro Remake SUPER5 OLED (Rev 01) + * [E1] 01 [10]: Retro Remake SUPER5 OLED HD (Rev 01) * * 7.0" OLED panels for Aula SKU: * [50] 9B [20]: Samsung AMS699VC01-0 (Rev 2.5) + * [E0] 01 [20]: Retro Remake SUPER7 OLED (Rev 01) + * [E1] 01 [20]: Retro Remake SUPER7 OLED HD (Rev 01) */ /* Display ID Decoding: @@ -854,6 +860,12 @@ enum PANEL_AUO_A055TAN01 = 0x1030, PANEL_SHP_LQ055T1SW10 = 0x1040, PANEL_SAM_AMS699VC01 = 0x2050, + PANEL_RR_SUPER5_OLED_V1 = 0x10E0, + PANEL_RR_SUPER5_OLED_HD_V1 = 0x10E1, + PANEL_RR_SUPER7_IPS_V1 = 0x0FE0, + PANEL_RR_SUPER7_IPS_HD_V1 = 0x0FE1, + PANEL_RR_SUPER7_OLED_7V1 = 0x20E0, + PANEL_RR_SUPER7_OLED_HD_7V1 = 0x20E1, // Found on 6/2" clones. Unknown markings. Clone of AUO A062TAN01. // Quality seems JDI like. Has bad low backlight scaling. ID: [83] 94 [0F]. Sometimes reports [30] 94 [0F]. Both IDs have correct CRC16. diff --git a/bdk/storage/sd.c b/bdk/storage/sd.c index 56e56345..9d70efed 100644 --- a/bdk/storage/sd.c +++ b/bdk/storage/sd.c @@ -227,7 +227,7 @@ static void _sd_deinit(bool deinit) if (sd_init_done) { if (sd_mounted) - f_unmount("sd:", 1); // Volume 0 is SD. + f_unmount("sd:"); // Volume 0 is SD. if (deinit) { diff --git a/bootloader/hos/hos.c b/bootloader/hos/hos.c index 6a3a4c58..315198b2 100644 --- a/bootloader/hos/hos.c +++ b/bootloader/hos/hos.c @@ -756,7 +756,6 @@ void hos_launch(ini_sec_t *cfg) // Check if stock is enabled and device can boot in OFW. if (ctxt.stock && (h_cfg.t210b01 || !tools_autorcm_enabled())) { - sdram_src_pllc(false); emummc_storage_end(); emusd_storage_end(); emmc_end(); @@ -1144,7 +1143,6 @@ void hos_launch(ini_sec_t *cfg) error: _free_launch_components(&ctxt); - sdram_src_pllc(false); emummc_storage_end(); emusd_storage_end(); emmc_end(); diff --git a/bootloader/main.c b/bootloader/main.c index c5449639..c613c54e 100644 --- a/bootloader/main.c +++ b/bootloader/main.c @@ -1489,7 +1489,7 @@ ment_t ment_top[] = { MDEF_END() }; -menu_t menu_top = { ment_top, "hekate v6.5.2", 0, 0 }; +menu_t menu_top = { ment_top, "hekate-pro v6.5.2", 0, 0 }; extern void pivot_stack(u32 stack_top); diff --git a/nyx/nyx_gui/frontend/fe_emusd_tools.c b/nyx/nyx_gui/frontend/fe_emusd_tools.c index 426a9876..0719bead 100644 --- a/nyx/nyx_gui/frontend/fe_emusd_tools.c +++ b/nyx/nyx_gui/frontend/fe_emusd_tools.c @@ -238,7 +238,7 @@ int create_emusd(int part_idx, u32 sector_mbr, u32 sector_start, u32 sector_size if(mkfs_error == FR_OK){ u8 random_number[16]; mbr_t mbr = {0}; - se_gen_prng128(random_number); + se_rng_pseudo(random_number, SE_RNG_BLOCK_SIZE); memcpy(&mbr.signature, random_number, 4); mbr.boot_signature = 0xaa55; mbr.partitions[0].start_sct = sector_start - sector_mbr; diff --git a/nyx/nyx_gui/frontend/gui.c b/nyx/nyx_gui/frontend/gui.c index f82a528c..643a2254 100644 --- a/nyx/nyx_gui/frontend/gui.c +++ b/nyx/nyx_gui/frontend/gui.c @@ -920,7 +920,7 @@ static void _launch_hos(u8 autoboot, u8 autoboot_list) (*main_ptr)(); } -void reload_nyx() +void reload_nyx(lv_obj_t *obj, bool force) { b_cfg->boot_cfg = BOOT_CFG_AUTOBOOT_EN; b_cfg->autoboot = 0; @@ -942,7 +942,7 @@ 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(NULL, true); return nyx_mbox_action(btns, txt); } @@ -999,7 +999,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() && boot_storage_get_drive() == DRIVE_SD) - reload_nyx(); + reload_nyx(NULL, true); } lv_task_t *task_emmc_errors; @@ -1996,7 +1996,7 @@ static void _create_tab_home(lv_theme_t *th, lv_obj_t *parent) // Set brand label. lv_obj_t *label_brand = lv_label_create(parent, NULL); lv_label_set_recolor(label_brand, true); - s_printf(btn_colored_text, "%s%s", text_color, " hekate#"); + s_printf(btn_colored_text, "%s%s", text_color, " hekate-pro#"); lv_label_set_text(label_brand, btn_colored_text); lv_obj_set_pos(label_brand, 50, 48); @@ -2396,7 +2396,7 @@ static void _nyx_main_menu(lv_theme_t * th) // Add all tabs content. char version[32]; char rel = (nyx_str->version >> 24) & 0xFF; - s_printf(version, "hekate %s%d.%d.%d%c%c", + s_printf(version, "hekate-pro %s%d.%d.%d%c%c", rel ? "v" : "", nyx_str->version & 0xFF, (nyx_str->version >> 8) & 0xFF, (nyx_str->version >> 16) & 0xFF, rel > 'a' ? rel : 0, (nyx_str->info_ex.rsvd_flags & RSVD_FLAG_DRAM_8GB) ? '*' : 0); lv_obj_t *tab_about = lv_tabview_add_tab(tv, version); diff --git a/nyx/nyx_gui/frontend/gui_emu_tools.c b/nyx/nyx_gui/frontend/gui_emu_tools.c index a1311dc0..32e98583 100644 --- a/nyx/nyx_gui/frontend/gui_emu_tools.c +++ b/nyx/nyx_gui/frontend/gui_emu_tools.c @@ -31,7 +31,7 @@ static lv_obj_t *_create_container(lv_obj_t *parent){ } lv_res_t create_win_emu_tools(lv_obj_t *btn){ - lv_obj_t *win = nyx_create_standard_window(SYMBOL_EDIT " emuMMC Manage"); + lv_obj_t *win = nyx_create_standard_window(SYMBOL_EDIT " emuMMC Manage", NULL); static lv_style_t win_style_no_pad; lv_style_copy(&win_style_no_pad, lv_win_get_style(win, LV_WIN_STYLE_CONTENT_BG)); diff --git a/nyx/nyx_gui/frontend/gui_emummc_tools.c b/nyx/nyx_gui/frontend/gui_emummc_tools.c index e143d46f..ce4305a4 100644 --- a/nyx/nyx_gui/frontend/gui_emummc_tools.c +++ b/nyx/nyx_gui/frontend/gui_emummc_tools.c @@ -229,7 +229,7 @@ static lv_res_t _ask_resize_action(lv_obj_t *btns, const char *txt){ break; } - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); return LV_RES_INV; } @@ -269,7 +269,7 @@ static lv_res_t _create_emummc_raw_action(lv_obj_t * btns, const char * txt) memset(&emummc_part_cfg, 0, sizeof(emummc_part_cfg)); } - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); return LV_RES_INV; } @@ -307,7 +307,7 @@ static lv_res_t _ask_resize_action_emmc(lv_obj_t *btns, const char *txt){ break; } - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); return LV_RES_INV; } @@ -346,9 +346,8 @@ static lv_res_t _create_emummc_emmc_raw_action(lv_obj_t *btns, const char *txt){ memset(&emummc_part_cfg, 0, sizeof(emummc_part_cfg)); } - mbox_action(btns, txt); - nyx_mbox_action(btns, txt); + return LV_RES_INV; } @@ -357,7 +356,7 @@ static lv_res_t _create_emummc_emmc_raw_format(lv_obj_t * btns, const char * txt int btn_idx = lv_btnm_get_pressed(btns); // Delete parent mbox. - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); // Create partition window. if (!btn_idx) @@ -620,7 +619,7 @@ static lv_res_t _create_emummc_file_based_action(lv_obj_t *btns, const char *txt _create_window_emummc(); } - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); return LV_RES_INV; } @@ -747,7 +746,7 @@ static void _create_mbox_emummc_file_based(){ static lv_res_t _create_emummc_select_file_type_action(lv_obj_t *btns, const char *txt){ int btn_idx = lv_btnm_get_pressed(btns); - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); memset(&emummc_part_cfg, 0, sizeof(emummc_part_cfg)); @@ -770,7 +769,7 @@ static lv_res_t _create_emummc_select_file_type_action(lv_obj_t *btns, const cha static lv_res_t _create_emummc_select_raw_type_action(lv_obj_t *btns, const char *txt){ int btn_idx = lv_btnm_get_pressed(btns); - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); memset(&emummc_part_cfg, 0, sizeof(emummc_part_cfg)); @@ -832,7 +831,7 @@ static void _create_mbox_emummc_select_file_type(){ static lv_res_t _create_emummc_select_type_action(lv_obj_t *btns, const char *txt){ int btn_idx = lv_btnm_get_pressed(btns); - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); switch(btn_idx){ case 0: @@ -891,7 +890,7 @@ static void _change_raw_emummc_part_type() static lv_res_t _save_emummc_cfg_mig_mbox_action(lv_obj_t *btns, const char *txt) { // Delete main emuMMC and popup windows and relaunch main emuMMC window. - lv_obj_del(emummc_manage_window); + lv_obj_clean(emummc_parent_cont); nyx_mbox_action(btns, txt); (*emummc_tools)(emummc_parent_cont); @@ -949,6 +948,7 @@ static void _migrate_sd_raw_emummc_based() boot_storage_unmount(); sd_unmount(); } + static u32 _copy_file(const char *src, const char* dest){ u32 res = FR_OK; u8 *buf = (u8*)MIXD_BUF_ALIGNED; @@ -1814,7 +1814,8 @@ out1: lv_res_t create_tab_emummc_tools(lv_obj_t *parent) { - lv_obj_t *win = nyx_create_standard_window(SYMBOL_EDIT" emuMMC Manage", NULL); + emummc_parent_cont = parent; + emummc_tools = &create_tab_emummc_tools; boot_storage_mount(); diff --git a/nyx/nyx_gui/frontend/gui_emusd_tools.c b/nyx/nyx_gui/frontend/gui_emusd_tools.c index 673ad011..d838c487 100644 --- a/nyx/nyx_gui/frontend/gui_emusd_tools.c +++ b/nyx/nyx_gui/frontend/gui_emusd_tools.c @@ -66,7 +66,7 @@ static void _get_emusd_parts(gpt_t *gpt){ static lv_res_t _close_mbox_and_reload(lv_obj_t *btns, const char *txt){ lv_obj_clean(emusd_parent_cont); - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); (*emusd_tools)(emusd_parent_cont); @@ -75,7 +75,7 @@ static lv_res_t _close_mbox_and_reload(lv_obj_t *btns, const char *txt){ static lv_res_t _emusd_create_action(lv_obj_t *btns, const char *txt){ int idx = lv_btnm_get_pressed(btns); - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); if(idx < gpt_ctxt.cnt) { lv_obj_t *dark_bg = lv_obj_create(lv_scr_act(), NULL); @@ -128,7 +128,7 @@ static lv_res_t _emusd_create_action(lv_obj_t *btns, const char *txt){ static lv_res_t _emusd_format_action(lv_obj_t *btns, const char *txt){ u32 idx = lv_btnm_get_pressed(btns); - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); if(!idx){ create_window_partition_manager(btns, emusd_drive); @@ -160,7 +160,7 @@ static lv_res_t _action_slider_emusd_file(lv_obj_t *slider){ static lv_res_t _create_emusd_file_based_action(lv_obj_t *btns, const char *txt){ int idx = lv_btnm_get_pressed(btns); - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); if(!idx && slider_ctx.emu_size) { lv_obj_t *dark_bg = lv_obj_create(lv_scr_act(), NULL); @@ -327,7 +327,7 @@ static void _create_mbox_emusd_file_based(){ static lv_res_t _create_emusd_select_file_type_action(lv_obj_t *btns, const char *txt){ int btn_idx = lv_btnm_get_pressed(btns); - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); switch(btn_idx){ case 0: @@ -444,7 +444,7 @@ static void _create_mbox_emusd_raw() { static lv_res_t _create_emusd_select_raw_type_action(lv_obj_t *btns, const char *txt){ int btn_idx = lv_btnm_get_pressed(btns); - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); switch(btn_idx){ case 0: @@ -485,7 +485,7 @@ static void _create_mbox_emusd_select_raw_type(){ static lv_res_t _create_emusd_select_type_action(lv_obj_t *btns, const char *txt){ int btn_idx = lv_btnm_get_pressed(btns); - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); switch(btn_idx){ case 0: @@ -659,7 +659,7 @@ static lv_res_t _save_emmc_raw_emusd_cfg_action(lv_obj_t * btn) static lv_res_t _create_change_emusd_window(lv_obj_t *btn_caller) { - lv_obj_t *win = nyx_create_standard_window(SYMBOL_SETTINGS" Change emuSD"); + lv_obj_t *win = nyx_create_standard_window(SYMBOL_SETTINGS" Change emuSD", NULL); lv_win_add_btn(win, NULL, SYMBOL_POWER" Disable", _save_disable_emusd_cfg_action); boot_storage_mount(); @@ -677,7 +677,7 @@ static lv_res_t _create_change_emusd_window(lv_obj_t *btn_caller) memset(emusd_img->part_path, 0, 3 * 128); - emusd_img->dirlist = dirlist("emuSD", NULL, false, true); + emusd_img->dirlist = dirlist("emuSD", NULL, DIR_SHOW_DIRS); if(!emusd_img->dirlist){ goto out0; @@ -1022,7 +1022,7 @@ lv_res_t create_tab_emusd_tools(lv_obj_t *parent) lv_obj_t *label_txt = lv_label_create(h1, NULL); lv_label_set_static_text(label_txt, "emuSD Info & Selection"); lv_obj_set_style(label_txt, lv_theme_get_current()->label.prim); - lv_obj_align(label_txt, h1, LV_ALIGN_IN_TOP_LEFT, LV_DPI / 4, -LV_DPI / 9); + lv_obj_align(label_txt, h1, LV_ALIGN_IN_TOP_LEFT, LV_DPI / 4, LV_DPI / 11); lv_obj_t *line_sep = lv_line_create(h1, NULL); static const lv_point_t line_pp[] = { {0, 0}, { LV_HOR_RES - (LV_DPI - (LV_DPI / 4)) * 2, 0} }; @@ -1108,7 +1108,7 @@ lv_res_t create_tab_emusd_tools(lv_obj_t *parent) lv_obj_t *label_txt3 = lv_label_create(h2, NULL); lv_label_set_static_text(label_txt3, "emuSD Tools"); lv_obj_set_style(label_txt3, lv_theme_get_current()->label.prim); - lv_obj_align(label_txt3, h2, LV_ALIGN_IN_TOP_LEFT, LV_DPI / 4, 0); + lv_obj_align(label_txt3, h2, LV_ALIGN_IN_TOP_LEFT, LV_DPI / 4, LV_DPI / 5); line_sep = lv_line_create(h2, line_sep); lv_obj_align(line_sep, label_txt3, LV_ALIGN_OUT_BOTTOM_LEFT, -(LV_DPI / 4), LV_DPI / 8); diff --git a/nyx/nyx_gui/frontend/gui_info.c b/nyx/nyx_gui/frontend/gui_info.c index e6b99641..9e408035 100644 --- a/nyx/nyx_gui/frontend/gui_info.c +++ b/nyx/nyx_gui/frontend/gui_info.c @@ -1103,6 +1103,78 @@ static lv_res_t _create_window_hw_info_status(lv_obj_t *btn) switch (display_id) { + case PANEL_RR_SUPER5_OLED_V1: + strcat(txt_buf, "RR SUPER5 OLED"); + switch (display_rev) + { + case 0x01: + strcat(txt_buf, "-V1"); + break; + default: + strcat(txt_buf, " #FFDD00 Contact me!#"); + break; + } + break; + case PANEL_RR_SUPER5_OLED_HD_V1: + strcat(txt_buf, "RR SUPER5 OLED HD"); + switch (display_rev) + { + case 0x01: + strcat(txt_buf, "-V1"); + break; + default: + strcat(txt_buf, " #FFDD00 Contact me!#"); + break; + } + break; + case PANEL_RR_SUPER7_IPS_V1: + strcat(txt_buf, "RR SUPER7 IPS"); + switch (display_rev) + { + case 0x01: + strcat(txt_buf, "-V1"); + break; + default: + strcat(txt_buf, " #FFDD00 Contact me!#"); + break; + } + break; + case PANEL_RR_SUPER7_IPS_HD_V1: + strcat(txt_buf, "RR SUPER7 IPS HD"); + switch (display_rev) + { + case 0x01: + strcat(txt_buf, "-V1"); + break; + default: + strcat(txt_buf, " #FFDD00 Contact me!#"); + break; + } + break; + case PANEL_RR_SUPER7_OLED_7V1: + strcat(txt_buf, "RR SUPER7 OLED"); + switch (display_rev) + { + case 0x01: + strcat(txt_buf, "-V1"); + break; + default: + strcat(txt_buf, " #FFDD00 Contact me!#"); + break; + } + break; + case PANEL_RR_SUPER7_OLED_HD_7V1: + strcat(txt_buf, "RR SUPER7 OLED HD"); + switch (display_rev) + { + case 0x01: + strcat(txt_buf, "-V1"); + break; + default: + strcat(txt_buf, " #FFDD00 Contact me!#"); + break; + } + break; case PANEL_JDI_LAM062M109A: strcat(txt_buf, "JDI LAM062M109A"); break; @@ -2039,6 +2111,9 @@ static lv_res_t _create_window_emmc_info_status(lv_obj_t *btn) strcat(txt_buf, "SanDisk "); lv_win_add_btn(win, NULL, SYMBOL_FILE_ALT" Device Report", _create_mbox_emmc_sandisk_report); break; + case 0x70: // Unofficial. + strcat(txt_buf, "Kingston "); + break; case 0x89: // Unofficial. strcat(txt_buf, "Silicon Motion "); break; diff --git a/nyx/nyx_gui/frontend/gui_options.c b/nyx/nyx_gui/frontend/gui_options.c index 44dea975..05d294ee 100644 --- a/nyx/nyx_gui/frontend/gui_options.c +++ b/nyx/nyx_gui/frontend/gui_options.c @@ -457,7 +457,7 @@ static lv_res_t _action_win_nyx_colors_save(lv_obj_t *btn) // Save nyx config. create_nyx_config_entry(true); - reload_nyx(); + reload_nyx(NULL, false); return LV_RES_OK; } diff --git a/nyx/nyx_gui/frontend/gui_tools.c b/nyx/nyx_gui/frontend/gui_tools.c index e1b72abd..17dd6722 100644 --- a/nyx/nyx_gui/frontend/gui_tools.c +++ b/nyx/nyx_gui/frontend/gui_tools.c @@ -1769,7 +1769,7 @@ lv_res_t _partition_action(lv_obj_t *btnm, const char *txt){ return LV_RES_OK; } -static void _create_tab_tools_emmc_pkg12(lv_theme_t *th, lv_obj_t *parent) +static void _create_tab_tools_emmc_sd_usb(lv_theme_t *th, lv_obj_t *parent) { lv_page_set_scrl_layout(parent, LV_LAYOUT_PRETTY); diff --git a/nyx/nyx_gui/frontend/gui_tools_partition_manager.c b/nyx/nyx_gui/frontend/gui_tools_partition_manager.c index 1b81ad3c..80c79f14 100644 --- a/nyx/nyx_gui/frontend/gui_tools_partition_manager.c +++ b/nyx/nyx_gui/frontend/gui_tools_partition_manager.c @@ -941,7 +941,7 @@ static lv_res_t _action_delete_linux_installer_files(lv_obj_t * btns, const char int btn_idx = lv_btnm_get_pressed(btns); // Delete parent mbox. - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); // Flash Linux. if (!btn_idx) @@ -992,7 +992,7 @@ static lv_res_t _action_flash_linux_data(lv_obj_t * btns, const char * txt) int btn_idx = lv_btnm_get_pressed(btns); // Delete parent mbox. - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); bool succeeded = false; @@ -1184,7 +1184,7 @@ exit: } if (!succeeded) - lv_mbox_add_btns(mbox, mbox_btn_map, mbox_action); + lv_mbox_add_btns(mbox, mbox_btn_map, nyx_mbox_action); else lv_mbox_add_btns(mbox, mbox_btn_map2, _action_delete_linux_installer_files); lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, 0); @@ -1387,7 +1387,7 @@ static lv_res_t _action_check_flash_linux(lv_obj_t *btn) goto exit; error: - lv_mbox_add_btns(mbox, mbox_btn_map, mbox_action); + lv_mbox_add_btns(mbox, mbox_btn_map, nyx_mbox_action); exit: boot_storage_unmount(); @@ -1409,7 +1409,7 @@ static lv_res_t _action_reboot_recovery(lv_obj_t * btns, const char * txt) int btn_idx = lv_btnm_get_pressed(btns); // Delete parent mbox. - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); if (!btn_idx) { @@ -1446,7 +1446,7 @@ static lv_res_t _action_flash_android_data(lv_obj_t * btns, const char * txt) bool boot_recovery = false; // Delete parent mbox. - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); if (btn_idx) return LV_RES_INV; @@ -1708,7 +1708,7 @@ error: lv_mbox_add_btns(mbox, mbox_btn_map2, _action_reboot_recovery); } else - lv_mbox_add_btns(mbox, mbox_btn_map, mbox_action); + lv_mbox_add_btns(mbox, mbox_btn_map, nyx_mbox_action); lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, 0); @@ -1814,7 +1814,7 @@ static lv_res_t _action_flash_android_slot_select1(lv_obj_t *btns, const char *t break; } - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); return _action_flash_android(NULL); } @@ -1847,7 +1847,7 @@ static lv_res_t _action_flash_android_slot_select(lv_obj_t *btn){ if(n_slots == 0){ lv_label_set_text(lbl_status, "No Android partitions found!\n"); - lv_mbox_add_btns(mbox, mbox_btn_map2, mbox_action); + lv_mbox_add_btns(mbox, mbox_btn_map2, nyx_mbox_action); }else{ lv_label_set_text(lbl_status, "Found multible sets of Android partitions.\n" @@ -1884,7 +1884,7 @@ static lv_res_t _action_part_manager_flash_options0(lv_obj_t *btns, const char * _action_flash_android_slot_select(btns); break; case 3: - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); return LV_RES_INV; } @@ -1908,11 +1908,11 @@ static lv_res_t _action_part_manager_flash_options1(lv_obj_t *btns, const char * lv_obj_del(ums_mbox); break; case 1: - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); _action_check_flash_linux(NULL); return LV_RES_INV; case 2: - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); return LV_RES_INV; } @@ -1936,11 +1936,11 @@ static lv_res_t _action_part_manager_flash_options2(lv_obj_t *btns, const char * lv_obj_del(ums_mbox); break; case 1: - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); _action_flash_android_slot_select(NULL); return LV_RES_INV; case 2: - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); return LV_RES_INV; } @@ -2467,7 +2467,7 @@ error: exit: if(!buttons_set){ - lv_mbox_add_btns(mbox, mbox_btn_map, mbox_action); + lv_mbox_add_btns(mbox, mbox_btn_map, nyx_mbox_action); } lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, 0); lv_obj_set_top(mbox, true); @@ -2670,7 +2670,7 @@ exit: free(txt_buf); if (!buttons_set) - lv_mbox_add_btns(mbox, mbox_btn_map, mbox_action); + lv_mbox_add_btns(mbox, mbox_btn_map, nyx_mbox_action); lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, 0); lv_obj_set_top(mbox, true); @@ -2695,11 +2695,11 @@ static lv_res_t _create_mbox_partitioning_option0(lv_obj_t *btns, const char *tx } return LV_RES_OK; case 1: - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); _create_mbox_start_partitioning(); break; case 2: - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); break; } @@ -2710,11 +2710,11 @@ static lv_res_t _create_mbox_partitioning_option1(lv_obj_t *btns, const char *tx { int btn_idx = lv_btnm_get_pressed(btns); - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); if (!btn_idx) { - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); if (!part_info.emmc) _create_mbox_start_partitioning(); else @@ -2819,7 +2819,7 @@ static lv_res_t _create_mbox_partitioning_android(lv_obj_t *btns, const char *tx { part_info.and_dynamic = lv_btnm_get_pressed(btns); - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); _create_mbox_partitioning_warn(); @@ -3320,7 +3320,7 @@ static lv_res_t _mbox_check_files_total_size_option(lv_obj_t *btns, const char * if (!lv_btnm_get_pressed(btns)) part_info.backup_possible = false; - mbox_action(btns, txt); + nyx_mbox_action(btns, txt); return LV_RES_INV; } @@ -3714,7 +3714,7 @@ static void _create_mbox_check_files_total_size(u8 drive) if (!part_info.backup_possible) - lv_mbox_add_btns(mbox, mbox_btn_map, mbox_action); + lv_mbox_add_btns(mbox, mbox_btn_map, nyx_mbox_action); else lv_mbox_add_btns(mbox, mbox_btn_map2, _mbox_check_files_total_size_option); @@ -4049,7 +4049,7 @@ check_changes: out: free(gpt); - lv_mbox_add_btns(mbox, mbox_btn_map, mbox_action); + lv_mbox_add_btns(mbox, mbox_btn_map, nyx_mbox_action); lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, 0); lv_obj_set_top(mbox, true); @@ -4061,7 +4061,7 @@ lv_res_t create_window_partition_manager(lv_obj_t *btn, u8 drive) { char title_str[0x20]; s_printf(title_str, "%s %s Partition Manager", drive == DRIVE_SD ? SYMBOL_SD : SYMBOL_CHIP, drive == DRIVE_SD ? "SD" : "eMMC"); - lv_obj_t *win = nyx_create_standard_window(title_str); + lv_obj_t *win = nyx_create_standard_window(title_str, NULL); if(drive == DRIVE_SD){ lv_win_add_btn(win, NULL, SYMBOL_MODULES_ALT" Fix Hybrid MBR/GPT", _action_fix_mbr_gpt); @@ -4485,12 +4485,6 @@ lv_res_t create_window_partition_manager(lv_obj_t *btn, u8 drive) lv_obj_align(slider_and, lbl_and, LV_ALIGN_IN_LEFT_MID, LV_DPI * 3, 0); lv_slider_set_action(slider_and, _action_slider_and); - // Create container for the labels. - lv_obj_t *cont_lbl = lv_cont_create(h1, NULL); - lv_cont_set_fit(cont_lbl, false, true); - lv_obj_set_width(cont_lbl, LV_DPI * 3 / 2); - part_info.cont_lbl = cont_lbl; - // Create emuSD size slider lv_obj_t *slider_emu_sd = lv_slider_create(h1, NULL); lv_obj_set_size(slider_emu_sd, LV_DPI * 7, LV_DPI / 3); @@ -4518,7 +4512,7 @@ lv_res_t create_window_partition_manager(lv_obj_t *btn, u8 drive) part_info.lbl_hos_os = lbl_sl_hos_os; // Create HOS size label. - lv_obj_t *lbl_sl_hos = lv_label_create(cont_lbl, NULL); + lv_obj_t *lbl_sl_hos = lv_label_create(h1, NULL); lv_label_set_recolor(lbl_sl_hos, true); s_printf(txt_buf, "#96FF00 %d GiB#", part_info.hos_size >> 10); lv_label_set_text(lbl_sl_hos, txt_buf); @@ -4581,10 +4575,7 @@ lv_res_t create_window_partition_manager(lv_obj_t *btn, u8 drive) label_btn = lv_label_create(btn_flash_l4t, NULL); lv_btn_set_fit(btn_flash_l4t, true, true); lv_label_set_static_text(label_btn, SYMBOL_DOWNLOAD" Flash Linux"); - if (!emmc) - lv_obj_align(btn_flash_l4t, btn1, LV_ALIGN_OUT_RIGHT_MID, LV_DPI / 3, 0); - else - lv_obj_align(btn_flash_l4t, h1, LV_ALIGN_IN_TOP_LEFT, 0, LV_DPI * 5); + lv_obj_align(btn_flash_l4t, btn1, LV_ALIGN_OUT_RIGHT_MID, LV_DPI / 3, 0); lv_btn_set_action(btn_flash_l4t, LV_BTN_ACTION_CLICK, _action_check_flash_linux); // Disable Flash Linux button if partition not found. diff --git a/nyx/nyx_gui/nyx.c b/nyx/nyx_gui/nyx.c index 6da72025..d8b04360 100644 --- a/nyx/nyx_gui/nyx.c +++ b/nyx/nyx_gui/nyx.c @@ -379,7 +379,7 @@ error_occured: msleep(1000); btn_wait(); - reload_nyx(); + reload_nyx(NULL, true); } }