Support for NYX to load from BOOT1/GPP/SD in that order, UMS option to mount whatever volume is selected as boot storage

This commit is contained in:
Christoph Baumann
2025-04-24 12:06:15 +02:00
parent 4e9e21b3b1
commit 337f219ac6
28 changed files with 425 additions and 150 deletions

View File

@@ -23,6 +23,7 @@
#include "../config.h"
#include <libs/lvgl/lv_themes/lv_theme_hekate.h>
#include <libs/lvgl/lvgl.h>
#include <storage/boot_storage.h>
#define CLOCK_MIN_YEAR 2024
#define CLOCK_MAX_YEAR (CLOCK_MIN_YEAR + 10)
@@ -227,7 +228,7 @@ static void _create_autoboot_window()
lv_obj_set_size(list_main, LV_HOR_RES * 4 / 10, LV_VER_RES * 4 / 7);
lv_list_set_single_mode(list_main, true);
sd_mount();
boot_storage_mount();
// Parse hekate main configuration.
LIST_INIT(ini_sections);
@@ -288,7 +289,7 @@ static void _create_autoboot_window()
ini_free(&ini_list_sections);
}
sd_unmount();
boot_storage_unmount();
}
static lv_res_t _autoboot_hide_delay_action(lv_obj_t *btn)
@@ -882,7 +883,7 @@ static lv_res_t _joycon_info_dump_action(lv_obj_t * btn)
jc_pad->bt_conn_r.type = is_r_hos ? jc_pad->bt_conn_r.type : 0;
save_data:
error = !sd_mount() ? 5 : 0;
error = !boot_storage_mount() ? 5 : 0;
if (!error)
{
@@ -896,7 +897,8 @@ save_data:
memcpy(data, &jc_pad->bt_conn_l, sizeof(jc_bt_conn_t));
memcpy(data + sizeof(jc_bt_conn_t), &jc_pad->bt_conn_r, sizeof(jc_bt_conn_t));
error = sd_save_to_file((u8 *)data, sizeof(jc_bt_conn_t) * 2, "switchroot/joycon_mac.bin") ? 4 : 0;
// TODO: JC dump should probably go to sd?
error = boot_storage_save_to_file((u8 *)data, sizeof(jc_bt_conn_t) * 2, "switchroot/joycon_mac.bin") ? 4 : 0;
// Save readable dump.
jc_bt_conn_t *bt = &jc_pad->bt_conn_l;
@@ -1024,7 +1026,7 @@ save_data:
}
}
sd_unmount();
boot_storage_unmount();
}
disabled_or_cal0_issue:;