Max Waine
SDL_mouse.c, if compiled for Windows, requires GetDoubleClickTime to compile (available from winuser.h). Without Vulkan present this fails to compile as the include chain for winuser.h is the following.
SDL_mouse.c -> SDL_sysvideo.h -> SDL_vulkan_internal.h -> SDL_windows.h -> windows.h -> winuser.h.
Problem is that SDL_vulkan_internal.h doesn't include SDL_windows.h if Vulkan isn't present, so under MinGW/GCC it will give a -Wimplicit-function-declaration warning for GetDoubleClickTime, and under MSVC fails to compile completely.
The solution to this would be to simplify the include chain: including SDL_windows.h under the same condition as GetDoubleClickTime (#ifdef __WIN32__) in SDL_mouse.c (or another file that isn't quite so indirectly included).
Anthony Pesch
Fix snd_device_name_hint return value check
According to the ALSA documentation, snd_device_name_hint returns 0 on
success, otherwise a negative error code. The code previously only
considered -1 to be an error, which let other error codes through
resulting in a segfault when hints (which was NULL) was dereferenced
Stian Skjelstad
check if $sdl_framework is set, before checking if directory exists
Patch that was merged here https://hg.libsdl.org/SDL/rev/ad4968de54ec made it impossible for the SDL2 detection to fail, since one of the if statements fails to check if a variable is set or not.
if test -d $sdl_framework; then
can evaluate to true in some shells. I guess it falls into undefined behaviour when looking at the POSIX standard.
Petr Pisar
The root cause is that the POC BMP file declares 3 colors used and 4 bpp palette, but pixel at line 28 and column 1 (counted from 0) has color number 3. Then when the image loaded into a surface is passed to SDL_DisplayFormat(), in order to convert it to a video format, a used bliting function looks up a color number 3 in a 3-element long color bliting map. (The map obviously has the same number entries as the surface format has colors.)
Proper fix should refuse broken BMP images that have a pixel with a color index higher than declared number of "used" colors. Possibly more advanced fix could try to relocate the out-of-range color index into a vacant index (if such exists).
Note that a single USB device is responsible for all 4 joysticks, so a large
rewrite of the DeviceDriver functions was necessary to allow a single device to
produce multiple joysticks.
This lets you build a custom embedded device that roughly offers the "this
process is going to the background NOW" semantics of SDL on a mobile device.
Only two chars are used but the full prototype is:
int tioclinux(struct tty_struct *tty, unsigned long arg)
==5010== Syscall param ioctl(TIOCLINUX) points to uninitialised byte(s)
==5010== at 0x53E73C7: ioctl (syscall-template.S:78)
==5010== by 0x4A887DA: SDL_EVDEV_Init (SDL_evdev.c:163)
==5010== by 0x4A7D157: KMSDRM_VideoInit (SDL_kmsdrmvideo.c:509)
==5010== by 0x497D959: SDL_VideoInit_REAL (SDL_video.c:529)
==5010== by 0x487ACBC: SDL_InitSubSystem_REAL (SDL.c:171)
==5010== by 0x487B052: SDL_Init_REAL (SDL.c:256)
==5010== by 0x488F7D6: SDL_Init (SDL_dynapi_procs.h:85)
This lets apps see and choose between both an HDMI and DSI-connected display,
such as a television and the Pi Foundation's official touchscreen. It only
exposes the second display if the hardware reports that it is connected.