Merged conflicts

This commit is contained in:
Devine Lu Linvega 2024-02-22 14:17:42 -08:00
commit 079f215a5c
3 changed files with 9 additions and 8 deletions

3
.gitignore vendored
View File

@ -12,7 +12,6 @@
*snarf *snarf
*theme *theme
*.rom *.rom.sym
*.sym
*.[o0125678vqki] *.[o0125678vqki]

4
src/uxncli.c Normal file → Executable file
View File

@ -47,11 +47,11 @@ main(int argc, char **argv)
int i = 1; int i = 1;
Uxn u = {0}; Uxn u = {0};
Uint8 dev[0x100] = {0}; Uint8 dev[0x100] = {0};
u.dev = (Uint8 *)&dev; u.dev = dev;
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)", "18 Feb 2024."); return system_error("Uxncli - Varvara Emulator(CLI)", "19 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 */

10
src/uxnemu.c Normal file → Executable file
View File

@ -131,8 +131,10 @@ stdin_handler(void *p)
SDL_Event event; SDL_Event event;
USED(p); USED(p);
event.type = stdin_event; event.type = stdin_event;
while(read(0, &event.cbutton.button, 1) > 0 && SDL_PushEvent(&event) >= 0) while(read(0, &event.cbutton.button, 1) > 0){
; while(SDL_PushEvent(&event) < 0)
SDL_Delay(25); /* slow down - the queue is most likely full */
}
return 0; return 0;
} }
@ -494,8 +496,8 @@ main(int argc, char **argv)
Uxn u = {0}; Uxn u = {0};
Uint8 dev[0x100] = {0}; Uint8 dev[0x100] = {0};
Uxn u_audio = {0}; Uxn u_audio = {0};
u.dev = (Uint8 *)&dev; u.dev = dev;
u_audio.dev = (Uint8 *)&dev; u_audio.dev = dev;
/* flags */ /* flags */
if(argc > 1 && argv[i][0] == '-') { if(argc > 1 && argv[i][0] == '-') {
if(!strcmp(argv[i], "-v")) if(!strcmp(argv[i], "-v"))