Originally, SDL 1.2 used "pulse" as the name for its PulseAudio driver.
While it now supports "pulseaudio" as well for compatibility with SDL
2.0 [1], there are still scripts and distro packages which set
SDL_AUDIODRIVER=pulse [2]. While it's possible to remove this in most
circumstances or replace it with "pulseaudio" or a comma-separated list,
this may still conflict if the environment variable is set globally and
old binary builds of SDL 1.2 (e.g. packaged with older games) are being
used.
To fix this on SDL 2.0, add a hardcoded check for "pulse" as an audio
driver name, and replace it with "pulseaudio". This mimics what SDL 1.2
does (but in reverse). Note that setting driver_attempt{,_len} is safe
here as they're reset correctly based on driver_attempt_end on the next
loop.
[1] d951409784
[2] https://bugzilla.opensuse.org/show_bug.cgi?id=1189778
This change corrects the mappings for the Atari gamecontroller and
adds support for the Atari Xbox 360 compatible gamecontroller. The Atari
game controller can switch between Atari and Xbox 360 mappings.
Although GCC and Clang automatically generate color diagnostics on
terminal output, they do not do so when the compiler output is piped
through another process, like in the case for ninja-build and ccache.
Similarly, it would also be nice to be able to see the color diagnostics
on the CI build log in the web interface provided by the CI providers.
The wrong logic, copy/pasted to a bunch of places, would correctly disable
the dynamic loading but fail to specify the libraries that SDL would now need
to explicitly link against.
This might have changed at some point in the Pulse API, or this might have
always been wrong, but we didn't notice because the dynamic loading code
hides it by casting things to void *. The static path, where it
assigns the function pointer directly, puts out a clear compiler warning,
though.
[--use-rendergeometry mode1|mode2]
mode1: Draw sprite2 as triangles that can be recombined as rect by software renderer
mode2: Draw sprite2 as triangles that can *not* be recombined as rect by software renderer
Use an 'indices' array
With Dear ImGui + software renderer, it draws:
- by default at 250 fps
- drops to 70 fps if you show the color picker
- drops to 10 fps if put the color picker fullscreen