0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-10-31 19:42:39 +00:00

Relaunch boot rom if launcher is not found

This commit is contained in:
neauoire 2022-11-11 21:12:30 -08:00
parent 3a834fdfc1
commit c8fc397054

View file

@ -53,6 +53,8 @@ static Uint8 zoom = 1;
static Uint32 stdin_event, audio0_event;
static Uint64 exec_deadline, deadline_interval, ms_interval;
char *rom_path;
static int
error(char *msg, const char *err)
{
@ -306,7 +308,8 @@ static void
restart(Uxn *u)
{
screen_resize(&uxn_screen, WIDTH, HEIGHT);
start(u, "launcher.rom");
if(!start(u, "launcher.rom"))
start(u, rom_path);
}
static Uint8
@ -497,6 +500,7 @@ main(int argc, char **argv)
} else if(!loaded++) {
if(!start(&u, argv[i]))
return error("Boot", "Failed to boot.");
rom_path = argv[i];
} else {
char *p = argv[i];
while(*p) console_input(&u, *p++);