uxncli will exit if no console vector
This commit is contained in:
parent
8abb621b12
commit
57396faa94
|
@ -51,12 +51,12 @@ main(int argc, char **argv)
|
||||||
if(i == argc)
|
if(i == argc)
|
||||||
return system_error("usage:", "uxncli [-v] file.rom [args..]");
|
return system_error("usage:", "uxncli [-v] file.rom [args..]");
|
||||||
if(argv[i][0] == '-' && argv[i][1] == 'v')
|
if(argv[i][0] == '-' && argv[i][1] == 'v')
|
||||||
return system_error("Uxncli - Varvara Emulator(CLI)", "13 Jan 2024.");
|
return system_error("Uxncli - Varvara Emulator(CLI)", "15 Feb 2024.");
|
||||||
if(!system_init(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++]))
|
if(!system_init(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++]))
|
||||||
return system_error("Init", "Failed to initialize uxn.");
|
return system_error("Init", "Failed to initialize uxn.");
|
||||||
/* eval */
|
/* eval */
|
||||||
u.dev[0x17] = argc - i;
|
u.dev[0x17] = argc - i;
|
||||||
if(uxn_eval(&u, PAGE_PROGRAM)) {
|
if(uxn_eval(&u, PAGE_PROGRAM) && PEEK2(u.dev + 0x10)) {
|
||||||
console_listen(&u, i, argc, argv);
|
console_listen(&u, i, argc, argv);
|
||||||
while(!u.dev[0x0f]) {
|
while(!u.dev[0x0f]) {
|
||||||
int c = fgetc(stdin);
|
int c = fgetc(stdin);
|
||||||
|
|
Loading…
Reference in New Issue