0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-30 01:33:01 +00:00

(uxnemu) Display new zoom values in usage

This commit is contained in:
Devine Lu Linvega 2023-04-17 09:59:00 -07:00
parent 72e23f0260
commit 453f491918
2 changed files with 4 additions and 4 deletions

View file

@ -52,16 +52,16 @@ int
main(int argc, char **argv) main(int argc, char **argv)
{ {
Uxn u; Uxn u;
int i; int i = 1;
if(argc < 2) if(argc < 2)
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");
if(!system_load(&u, argv[1])) if(!system_load(&u, argv[i++]))
return emu_error("Load", "Failed"); return emu_error("Load", "Failed");
if(!uxn_eval(&u, PAGE_PROGRAM)) if(!uxn_eval(&u, PAGE_PROGRAM))
return u.dev[0x0f] & 0x7f; return u.dev[0x0f] & 0x7f;
for(i = 2; i < argc; i++) { for(; i < argc; i++) {
char *p = argv[i]; char *p = argv[i];
while(*p) console_input(&u, *p++, CONSOLE_ARG); while(*p) console_input(&u, *p++, CONSOLE_ARG);
console_input(&u, '\n', i == argc - 1 ? CONSOLE_END : CONSOLE_EOA); console_input(&u, '\n', i == argc - 1 ? CONSOLE_END : CONSOLE_EOA);

View file

@ -502,7 +502,7 @@ main(int argc, char **argv)
set_zoom(DM.w / 1280); set_zoom(DM.w / 1280);
/* load rom */ /* load rom */
if(!start(&u, argv[i])) if(!start(&u, argv[i]))
return error("usage", "uxnemu [-s scale] file.rom"); return error("usage", "uxnemu [-2x][-3x] file.rom");
rom_path = argv[i++]; rom_path = argv[i++];
/* read arguments */ /* read arguments */
for(; i < argc; i++) { for(; i < argc; i++) {