Exit after returning code

This commit is contained in:
Devine Lu Linvega 2024-03-19 09:08:26 -07:00
parent 4a97a20a0c
commit b7660a1920
1 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,6 @@ emu_end(Uxn *u)
XDestroyImage(ximage); XDestroyImage(ximage);
XDestroyWindow(display, window); XDestroyWindow(display, window);
XCloseDisplay(display); XCloseDisplay(display);
exit(0);
return u->dev[0x0f] & 0x7f; return u->dev[0x0f] & 0x7f;
} }
@ -145,6 +144,7 @@ emu_event(Uxn *u)
} break; } break;
case ClientMessage: case ClientMessage:
emu_end(u); emu_end(u);
exit(0);
break; break;
case KeyPress: { case KeyPress: {
KeySym sym; KeySym sym;
@ -271,7 +271,7 @@ main(int argc, char **argv)
int i = 1; int i = 1;
char *rom; char *rom;
if(i != argc && argv[i][0] == '-' && argv[i][1] == 'v') { if(i != argc && argv[i][0] == '-' && argv[i][1] == 'v') {
fprintf(stdout, "Uxn11 - Varvara Emulator, 18 Mar 2024.\n"); fprintf(stdout, "Uxn11 - Varvara Emulator, 19 Mar 2024.\n");
i++; i++;
} }
rom = i == argc ? "boot.rom" : argv[i++]; rom = i == argc ? "boot.rom" : argv[i++];