SDL2 will implicitly disable batching if we force a specific
rendering driver (apparently the user setting SDL_RENDER_DRIVER
counts too) for backwards-compatibility with older programs that use
their own rendering side-by-side with SDL2's. We don't do that,
though, so this commit forces SDL2 to use batching if it's available
(2.0.10 and onwards).
This should reduce stalling when the OpenGL driver is still
processing the buffer when we're about to upload to it.
Hopefully, this is what was making the OpenGL ES 2.0 renderer so much
slower than the SDLTexture renderer on the Raspberry Pi 3B (SDL uses
*8* buffers). Unfortunately, I don't have access to it right now, so
I can't test this.
This used to be a feature before the accurate-portable split, I'm
just restoring it.
Previously, while the EXE itself had a unique icon, the window and
taskbar both used the generic 'small' icon, which the original EXE
only used for the window.
SDL2 gives us a way to assign separate icons to each, but it's a
little clunky: it's Windows-only, requires the icons be in .ico
format, and needs them to be embedded in the EXE as resource files.
Also, for some reason, SDL2 doesn't let us refer to them by name - we
have to use their numerical ID.
These list what video/render/audio backends are available, and which
are currently being used.
SDL2 allows you to choose a specific video/audio driver with the
SDL_VIDEODRIVER and SDL_AUDIODRIVER environment variables,
respectively, but there's no such option for the render driver.
The original code didn't account for it failing, which leads to
annoying bugs happening whenever it does fail.
Now, the game just closes, like it does with any other init error.