change ev_poll() to accept a wait parameter
commit3a09ee5ce530dbd925f1152106f7df74cc960ff3
authorrofl0r <rofl0r@users.noreply.github.com>
Sun, 20 Mar 2022 20:09:25 +0000 (20 20:09 +0000)
committerrofl0r <rofl0r@users.noreply.github.com>
Tue, 22 Mar 2022 03:13:55 +0000 (22 03:13 +0000)
tree91fbe8676b84c4a7dfe116ed5d519488697df940
parent29f84f24041f81b0215185c23b97aba2716be01a
change ev_poll() to accept a wait parameter

if provided and set to 1, the backend can use a blocking syscall
to wait without generating cpu usage through polling until an
event happens.

currently only implemented for the SDL2 backend which can make use
of SDL_WaitEvent() - which is currently frustrated by
https://github.com/libsdl-org/SDL/issues/5425 .

this mode will be used by the new menu system to not generate
cpu load while it is open and the user is idle.
main.c
sys.h
sys/linux/fbdev.c
sys/sdl/sdl.c
sys/sdl2/sdl2.c
sys/svga/svgalib.c
sys/thinlib/thinlib.c
sys/x11/xlib.c