implement SDL2 backend, use it by default
for some reason my software renderer in X11 got really slow, and
rendering at 3x or 4x scale makes emulation speed go to 50%.
this made it necessary to implement SDL2 support as only it supports
OpenGL hardware scaling.
In order to take advantage of hardware scaling, game is rendered
at 1x scale and copied to texture.
unfortunately (or maybe not) that means that none of the existing
software scalers can be used without re-introducing the performance
problem. apparently some of them exist as GPU shaders [0], but
i'm not really interested in these scalers anyway as i don't like
the result.
the spaghetti code in SDL.c is quite ugly and the port took much
longer than expected.
further changes:
- removed possibility to set SGB borders at runtime (you can use
command line option or config file though)
- improved speed of 1x stretchers by using memcpy() instead
- some cleanups such as using tables instead of huge switch blocks
to build the old SDL 1.2 backend, use make USE_SDL1=1
[0]: https://docs.scummvm.org/en/latest/advanced_topics/understand_graphics.html