Various fixes

This commit is contained in:
CTCaer
2020-07-18 00:54:35 +03:00
parent 45ca2938f5
commit 11df6030f9
4 changed files with 10 additions and 7 deletions

View File

@@ -365,7 +365,7 @@ void hos_eks_bis_clear()
se_aes_crypt_ecb(14, 1, eks, sizeof(hos_eks_mbr_t), eks, sizeof(hos_eks_mbr_t));
// Write EKS blob to SD.
memcpy(mbr + 0x60, eks, sizeof(hos_eks_mbr_t));
memcpy(mbr + 0x80, eks, sizeof(hos_eks_mbr_t));
hos_eks_rw_try(mbr, true);
free(eks);

View File

@@ -359,9 +359,11 @@ void nyx_init_load_res()
load_saved_configuration();
FIL fp;
f_open(&fp, "bootloader/sys/res.pak", FA_READ);
f_read(&fp, (void *)NYX_RES_ADDR, f_size(&fp), NULL);
f_close(&fp);
if (!f_open(&fp, "bootloader/sys/res.pak", FA_READ))
{
f_read(&fp, (void *)NYX_RES_ADDR, f_size(&fp), NULL);
f_close(&fp);
}
// If no custom switch icon exists, load normal.
if (f_stat("bootloader/res/icon_switch_custom.bmp", NULL))