The display deletion code would not free the driver data or name if the display index was the last, or only one, in the list.
(cherry picked from commit 20f1061cc8)
In the stdcpp thread implementation, the allocated std::thread objects were never deleted after joining/detaching
(cherry picked from commit 20dbe90771)
(cherry picked from commit 99d7b9e626)
When loading libraries the `SDL.mContext` is still `null`. This results in
relinker code path in `SDL.loadLibrary(...)` always throwing a null exception
and fallbacking to system loader.
Fix it by passing the context explicitly.
(cherry picked from commit 6a2dd96ac7)
Proton uses this on Linux to determine what the XInput slot is for the gamepad. Other applications will get the real controller name and VID/PID by virtue of the code in SDL_steam_virtual_gamepad.c
(cherry picked from commit 361cae0874)
(cherry picked from commit a6fdd155fb)
The former will respect user orientation lock setting while the latter does not.
(cherry picked from commit 3373667faa)
(cherry picked from commit 77285b6c3f)
avoids -Wformat warnings from mingw toolchains -- e.g.:
src/test/SDL_test_harness.c:581:37: warning: unknown conversion type character 'l' in format [-Wformat=]
(cherry picked from commit 49b6c24722)
(cherry picked from commit 863670c0a8)
When they are in simple report mode, the thumbstick gets turned into a digital hat, so let's use them in full report mode.
(cherry picked from commit bf27269952)
(cherry picked from commit 169f77ed5e)
Libdecor windows will have this done during the first frame configure, but bare xdg-toplevel windows need it set explicitly, or a non-resizable window might be able to be resized.
(cherry picked from commit fc6bbde525)
Also added the Logitech Chillstream to the list of PS3 controllers and fixed the right shoulder axis.
(cherry picked from commit b6d7adfec1)
(cherry picked from commit f520062ad1)
Custom theme file exists in project, but is not used by app, which is kinda unintuitive. Using it by default so people who not familiar with Android development won't spend lots of time troubleshooting.
(cherry picked from commit 8f88c32ca6)
(cherry picked from commit 1568501dd6)
This breaks applications using them in DirectInput mode, which isn't worth just getting battery status. We'll turn on enhanced mode if the application enables sensors.
(cherry picked from commit a87fa020ac)
(cherry picked from commit efaa58732a)
Noticed this in SDL-1.2 where gcc-13 emits a -Wuse-after-free warning.
No such warning in SDL2 and SDL3, because unlike SDL1.2, SDL_realloc()
is not a macro expanding to libc realloc(). It warns, of course, if
SDL_realloc() is replaced with plain realloc():
src/stdlib/SDL_iconv.c: In function 'SDL_iconv_string_REAL':
src/stdlib/SDL_iconv.c:824:39: warning: pointer 'oldstring' may be used after 'realloc' [-Wuse-after-free]
824 | outbuf = string + (outbuf - oldstring);
| ~~~~~~~~^~~~~~~~~~~~
src/stdlib/SDL_iconv.c:818:30: note: call to 'realloc' here
818 | string = (char *)realloc(string, stringsize + sizeof(Uint32));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(cherry picked from commit 2205626816)
(cherry picked from commit b6899f82fb)