(uxnemu) Write arguments end in console device
This commit is contained in:
parent
1bf0ffc5e5
commit
9a882a64c7
|
@ -102,6 +102,8 @@ uxn_halt(Uxn *u, Uint8 instr, Uint8 err, Uint16 addr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Console */
|
||||
|
||||
int
|
||||
console_input(Uxn *u, char c, int type)
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@ main(int argc, char **argv)
|
|||
{
|
||||
Uxn u;
|
||||
int i = 1;
|
||||
if(argc < 2)
|
||||
if(i == argc)
|
||||
return emu_error("Usage", "uxncli game.rom args");
|
||||
if(!uxn_boot(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8))))
|
||||
return emu_error("Boot", "Failed");
|
||||
|
|
|
@ -500,9 +500,11 @@ main(int argc, char **argv)
|
|||
set_zoom(argv[i++][1] - '0');
|
||||
else if(SDL_GetCurrentDisplayMode(0, &DM) == 0)
|
||||
set_zoom(DM.w / 1280);
|
||||
/* load rom */
|
||||
if(i == argc)
|
||||
return error("usage", "uxnemu [-2x][-3x] file.rom");
|
||||
/* load rom */
|
||||
if(i == argc - 1)
|
||||
u.dev[0x17] = CONSOLE_END;
|
||||
if(!start(&u, argv[i]))
|
||||
return error("Start", "Failed");
|
||||
rom_path = argv[i++];
|
||||
|
|
Loading…
Reference in New Issue