Nyx: emuMMC Manage window, Tools UI, and misc updates
- Add gui_emu_tools: emuMMC Manage window with correct positioning (LV_PROTECT_PARENT + re-parent to win) - Tools: single SD button (tap = SD partition manager, 3s hold = eMMC) - Remove emuSD from Nyx UI (tabs, UMS, partition manager); keep bootloader emusd - Shorten Create emuMMC description text by one character - Storage/build/config and dependency updates Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <storage/boot_storage.h>
|
||||
#include "../storage/emusd.h"
|
||||
#include <string.h>
|
||||
|
||||
#include <bdk.h>
|
||||
@@ -29,7 +31,7 @@
|
||||
//#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
||||
#define DPRINTF(...)
|
||||
|
||||
extern bool is_ipl_updated(void *buf, u32 size, const char *path, bool force);
|
||||
extern bool is_ipl_updated(void *buf, const char *path, bool force);
|
||||
|
||||
#define PKG3_KIP_SKIP_MAX 16
|
||||
|
||||
@@ -84,10 +86,9 @@ typedef struct _pkg3_content_t
|
||||
|
||||
static void _pkg3_update_r2p()
|
||||
{
|
||||
u32 size = 0;
|
||||
u8 *r2p_payload = sd_file_read("atmosphere/reboot_payload.bin", &size);
|
||||
u8 *r2p_payload = emusd_file_read("atmosphere/reboot_payload.bin", NULL);
|
||||
|
||||
is_ipl_updated(r2p_payload, size, "atmosphere/reboot_payload.bin", h_cfg.updater2p ? true : false);
|
||||
is_ipl_updated(r2p_payload, "emusd:atmosphere/reboot_payload.bin", h_cfg.updater2p ? true : false);
|
||||
|
||||
free(r2p_payload);
|
||||
}
|
||||
@@ -125,6 +126,10 @@ static int _pkg3_kip1_skip(char ***pkg3_kip1_skip, u32 *pkg3_kip1_skip_num, char
|
||||
|
||||
int parse_pkg3(launch_ctxt_t *ctxt, const char *path)
|
||||
{
|
||||
char *path1 = (char *)malloc(256);
|
||||
strcpy(path1, "emusd:");
|
||||
strcat(path1, path);
|
||||
|
||||
FIL fp;
|
||||
|
||||
char **pkg3_kip1_skip = NULL;
|
||||
@@ -152,16 +157,25 @@ int parse_pkg3(launch_ctxt_t *ctxt, const char *path)
|
||||
}
|
||||
|
||||
#ifdef HOS_MARIKO_STOCK_SECMON
|
||||
if (stock && emummc_disabled && (pkg1_old || h_cfg.t210b01))
|
||||
if (stock && emummc_disabled && (pkg1_old || h_cfg.t210b01)) {
|
||||
free(path1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#else
|
||||
if (stock && emummc_disabled && pkg1_old)
|
||||
if (stock && emummc_disabled && pkg1_old) {
|
||||
free(path1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Try to open PKG3.
|
||||
if (f_open(&fp, path, FA_READ) != FR_OK)
|
||||
if (f_open(&fp, path1, FA_READ) != FR_OK) {
|
||||
free(path1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void *pkg3 = malloc(f_size(&fp));
|
||||
|
||||
@@ -267,6 +281,7 @@ int parse_pkg3(launch_ctxt_t *ctxt, const char *path)
|
||||
_pkg3_update_r2p();
|
||||
|
||||
free(pkg3_kip1_skip);
|
||||
free(path1);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user