~rabbits/uxn

5f4cb9ba051e55d7477787bacae4d843c1aff951 — Sigrid Solveig Haflínudóttir 9 months ago 1bba517
uxnemu: delay for 25ms if failed to push stdin event - queue is probably full
1 files changed, 4 insertions(+), 2 deletions(-)

M src/uxnemu.c -rw-r--r-- => -rwxr-xr-x
M src/uxnemu.c => src/uxnemu.c +4 -2
@@ 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;
}