add SDL2 gfx backend
commitaaeec36d00d61c3034fde4092591cfc37f05fc88
authorrofl0r <rofl0r@users.noreply.github.com>
Sat, 28 Aug 2021 00:52:05 +0000 (28 00:52 +0000)
committerrofl0r <rofl0r@users.noreply.github.com>
Sat, 28 Aug 2021 01:38:09 +0000 (28 01:38 +0000)
treee5100323997982b2fbc8231d39e404b82edf9296
parent373a3e3fe0c49b70d10525c3a1aeec6b3f5804fd
add SDL2 gfx backend

the software scaling code of refresh.c is quite slow and in combination
with low-quality xorg drivers anything > scale 1 caused stuttering in
audio with the existing render backend and unplayable framerate with
scale > 2 in powersave governor.

the new SDL2 backend fixes all of that and even with crappy X11 drivers
that only work well in OpenGL mode scales of 5 and higher run at barely
10% total cpu load.

the SDL2 backend forces the engine to render at scale 1 to a 32bpp
pixel buffer, which is then scaled via hardware; therefore the addition
of delegate_scaling member to fb structure.

unlike the SDL1 backend, this one comes without SDL specific audio backend,
as i assume the SDL2 way to do audio is likely as crappy as the SDL1 way
using async callbacks from a separate thread and other idiocy that requires
about 10x times the amount of code to achieve what the ao backend already
perfectly provides.

so in order to use SDL2 port, use --with-sdl2 and --with-audio=ao.
Makefile.in
configure
configure.ac
fb.h
lcd.c
sys/nix/config.h.in
sys/sdl2/keymap.c [new file with mode: 0644]
sys/sdl2/sdl2.c [new file with mode: 0644]