Fri, 29 May 2020 14:48:05 -0700Fixed variable names to be consistent across functions
Sam Lantinga [Fri, 29 May 2020 14:48:05 -0700] rev 13873
Fixed variable names to be consistent across functions

Fri, 29 May 2020 13:37:21 -0700Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification
Sam Lantinga [Fri, 29 May 2020 13:37:21 -0700] rev 13872
Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification

Jan Bujak

I wrote a new driver for my gamepad on Linux. I'd like SDL to support it out-of-box, as currently it just treats it as a generic joystick instead of a gamepad. From what I can see the only way to do that is to either 1) pick one of the already supported controllers' PID, VID and button layouts and have my driver send that (effectively lying that it's something else), or 2) submit a preconfigured, hardcoded mapping to SDL.

Both of those, in my opinion, are silly when we already have the Linux Gamepad Specification which standarizes this:

https://www.kernel.org/doc/html/v4.15/input/gamepad.html

Unfortunately SDL doesn't make use of it currently. So I've took it upon myself to add it; patch is in the attachments.

Basically what the patch does is that if SDL finds no built-it controller mappings for a given joystick it then asks the joystick backend to autodetect it, and that uses the relevant evdev bits to figure out which button/axis is which. (See the specs for more details.)

With this patch applied my own driver for my controller works out-of-box with SDL with no extra configuration and is correctly recognized as a gamepad; this is also going to be the case for any other driver which follows the Linux Gamepad Specification.

Fri, 29 May 2020 13:05:37 +0100SDL_blit: Fix undefined bitshift operations
James Legg [Fri, 29 May 2020 13:05:37 +0100] rev 13871
SDL_blit: Fix undefined bitshift operations

Arithmatic operations promote Uint8 to signed int. If the top bit of a
Uint8 is set, and it is left shifted 24 places, then the result is not
representable in a signed 32 bit int. This would be undefined behaviour
on systems where int is 32 bits.

Fri, 24 Apr 2020 14:03:30 -0700Add Logitech G29 to steering wheel list
Brendan Shanks [Fri, 24 Apr 2020 14:03:30 -0700] rev 13870
Add Logitech G29 to steering wheel list

Thu, 28 May 2020 15:18:41 -0400wayland: Changed output removal in handle_surface_leave()
Ryan C. Gordon [Thu, 28 May 2020 15:18:41 -0400] rev 13869
wayland: Changed output removal in handle_surface_leave()

No longer needs an extra malloc, handles unexpected cases like the same
output being listed twice.

Thu, 28 May 2020 14:57:10 -0400wayland: Move buffer copy into mime_data_list_add()
Ryan C. Gordon [Thu, 28 May 2020 14:57:10 -0400] rev 13868
wayland: Move buffer copy into mime_data_list_add()

It makes it clearer who owns the memory, and more reasonable to free it on
failure in the creating function.

(and, of course, pacifies static analysis.)

Thu, 28 May 2020 14:47:55 -0400wayland: assert that mmap() didn't return NULL.
Ryan C. Gordon [Thu, 28 May 2020 14:47:55 -0400] rev 13867
wayland: assert that mmap() didn't return NULL.

In practice, it never _would_, but in theory it _might_, so this assertion
tells the static analyzer not to worry about it.

Wed, 27 May 2020 10:35:43 -0700Don't include the iOS joystick driver if joysticks are disabled
Sam Lantinga [Wed, 27 May 2020 10:35:43 -0700] rev 13866
Don't include the iOS joystick driver if joysticks are disabled

Wed, 27 May 2020 10:27:20 -0700Fixed building with --disable-joystick on iOS
Sam Lantinga [Wed, 27 May 2020 10:27:20 -0700] rev 13865
Fixed building with --disable-joystick on iOS

Wed, 27 May 2020 10:27:04 -0700Fixed building with --disable-joystick on Linux
Sam Lantinga [Wed, 27 May 2020 10:27:04 -0700] rev 13864
Fixed building with --disable-joystick on Linux