WGI calls SDL_DINPUT_JoystickPresent() so we need to be sure DInput remains
initialized for the lifetime of the WGI driver to avoid a crash or duplicated
joysticks between DInput and WGI.
If that condition was reachable, the return value should be negative to indicate that waiting for the timeout failed.
Otherwise, SDL_WaitEventTimeout would incorrectly return early.
- linux_process.c: add an SDLVisualTest_ScreenshotProcess() stub for
linux builds succeed.
- action_configparser.c: fixes -Wswitch warnings.
- testharness.c: fixes 'is used uninitialized' warnings for userevents.
- testharness.c: fixes format string argument to 'Force killing...'
- testquit.c: fix type of options array in main().
- windows_screenshot.c: lowercase windows.h header name.
- ran dos2unix on all sources and add missing newlines at files' ends.
- minor adjustments to autotools build system (which actually seems to
need more surgery for unnecessary stuff...)
Martin Gerhardy wrote:
If there is a variable named test, then cmake does variable-value comparison:
if (test STREQUAL "")
is equivalent to:
if ("${test}" STREQUAL "")
If there is no variable named test, then cmake does string literal comparison:
if (test STREQUAL "")
is equivalent to:
if ("test" STREQUAL "")
That means basically - the current stuff works - but is not how it should be done.
Fixes https://github.com/libsdl-org/SDL/issues/2100
SDL_Init(SDL_INIT_AUDIO) did not take into account that functions like
SDL_AddAudioDevice do register events, which will need final cleanup
and only gets fired when events were actually initialised.
Sample call stack of a malloc missing its free (Linux + PA):
SDL_malloc_REAL (SDL_malloc.c:5328)
SDL_AddEvent (SDL_events.c:445)
SDL_PeepEvents_REAL (SDL_events.c:531)
SDL_PushEvent_REAL (SDL_events.c:762)
SDL_AddAudioDevice (SDL_audio.c:443)
SourceInfoCallback (SDL_pulseaudio.c:681)
context_get_source_info_callback (introspect.c:534)
run_action (pdispatch.c:288)
pa_pdispatch_run (pdispatch.c:341)
pstream_packet_callback (context.c:349)
do_read (pstream.c:1012)
Fixes https://github.com/libsdl-org/SDL/issues/3005