uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 079f215a5ca49f9b24393ab719a807511ddb9d4d
parent 2017a8de7c4dbf24c4fe4dfc90ff23fef3b5458e
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Thu, 22 Feb 2024 14:17:42 -0800

Merged conflicts

Diffstat:
M.gitignore | 3+--
Msrc/uxncli.c | 4++--
Msrc/uxnemu.c | 10++++++----
3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -12,7 +12,6 @@ *snarf *theme -*.rom -*.sym +*.rom.sym *.[o0125678vqki] diff --git a/src/uxncli.c b/src/uxncli.c @@ -47,11 +47,11 @@ main(int argc, char **argv) int i = 1; Uxn u = {0}; Uint8 dev[0x100] = {0}; - u.dev = (Uint8 *)&dev; + u.dev = dev; if(i == argc) return system_error("usage:", "uxncli [-v] file.rom [args..]"); 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++])) return system_error("Init", "Failed to initialize uxn."); /* eval */ diff --git a/src/uxnemu.c b/src/uxnemu.c @@ -131,8 +131,10 @@ stdin_handler(void *p) SDL_Event event; USED(p); 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; } @@ -494,8 +496,8 @@ main(int argc, char **argv) Uxn u = {0}; Uint8 dev[0x100] = {0}; Uxn u_audio = {0}; - u.dev = (Uint8 *)&dev; - u_audio.dev = (Uint8 *)&dev; + u.dev = dev; + u_audio.dev = dev; /* flags */ if(argc > 1 && argv[i][0] == '-') { if(!strcmp(argv[i], "-v"))