(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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Console */
|
||||||
|
|
||||||
int
|
int
|
||||||
console_input(Uxn *u, char c, int type)
|
console_input(Uxn *u, char c, int type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,7 +53,7 @@ main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Uxn u;
|
Uxn u;
|
||||||
int i = 1;
|
int i = 1;
|
||||||
if(argc < 2)
|
if(i == argc)
|
||||||
return emu_error("Usage", "uxncli game.rom args");
|
return emu_error("Usage", "uxncli game.rom args");
|
||||||
if(!uxn_boot(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8))))
|
if(!uxn_boot(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8))))
|
||||||
return emu_error("Boot", "Failed");
|
return emu_error("Boot", "Failed");
|
||||||
|
|
|
@ -500,9 +500,11 @@ main(int argc, char **argv)
|
||||||
set_zoom(argv[i++][1] - '0');
|
set_zoom(argv[i++][1] - '0');
|
||||||
else if(SDL_GetCurrentDisplayMode(0, &DM) == 0)
|
else if(SDL_GetCurrentDisplayMode(0, &DM) == 0)
|
||||||
set_zoom(DM.w / 1280);
|
set_zoom(DM.w / 1280);
|
||||||
|
/* load rom */
|
||||||
if(i == argc)
|
if(i == argc)
|
||||||
return error("usage", "uxnemu [-2x][-3x] file.rom");
|
return error("usage", "uxnemu [-2x][-3x] file.rom");
|
||||||
/* load rom */
|
if(i == argc - 1)
|
||||||
|
u.dev[0x17] = CONSOLE_END;
|
||||||
if(!start(&u, argv[i]))
|
if(!start(&u, argv[i]))
|
||||||
return error("Start", "Failed");
|
return error("Start", "Failed");
|
||||||
rom_path = argv[i++];
|
rom_path = argv[i++];
|
||||||
|
|
Loading…
Reference in New Issue