Sun, 13 Aug 2017 20:51:08 -0700Fixed bug 3751 - DirectFB linux_input disabled by default
Sam Lantinga [Sun, 13 Aug 2017 20:51:08 -0700] rev 11269
Fixed bug 3751 - DirectFB linux_input disabled by default

Clayton Craft

linux_input module is disabled by default, despite the comments in source code that it is otherwise:

src/video/directfb/SDL_DirectFB_video.c:
devdata->use_linux_input = readBoolEnv(DFBENV_USE_LINUX_INPUT, 0); /* default: on */

src/video/directfb/SDL_DirectFB_video.h:
#define DFBENV_USE_LINUX_INPUT "SDL_DIRECTFB_LINUX_INPUT" /* Default: on */

When using the directfb driver, the linux_input module is suppressed unless the SDL app is started with "SDL_DIRECTFB_LINUX_INPUT=1" set in the environment. I recall seeing at one point that the directfb folks recommended using linux_input over the other input drivers, but I am having trouble locating this recommendation. In any case, I believe that this should really be defaulted to 'on' since it's vastly superior to the other dfb input drivers!

Sun, 13 Aug 2017 20:42:41 -0700Fixed bug 3299 - DirectInput: Incorrect joystick mapping when attaching new joysticks
Sam Lantinga [Sun, 13 Aug 2017 20:42:41 -0700] rev 11268
Fixed bug 3299 - DirectInput: Incorrect joystick mapping when attaching new joysticks

Jimb Esser

Note: This is using DirectInput, I have to disable XInput as that causes all but the first 4 controllers to be completely ignored by SDL (I can find no way to reconcile XInput devices with DirectInput devices, otherwise I would make a patch that accepts the fifth and later controllers with DirectInput...). XInput does not seem to have the problem below, only DirectInput.

I plug in 3 identical wireless Xbox 360 controllers, call them J1, J2, J3. Direct Input shows them as having GUIDs G1, G2, G3. I unplug J1, then J2 and J3 show up as having GUIDs G1 and G2! Not so "unique"... I start my SDL app when just J2 and J3 are plugged in, and open J2 and J3. Then I plug in a new controller, SDL sees that now G3 exists, assigns that a new SDL joystick instance ID, which I request to be opened, but G3 at this point is J3, which I already had opened! So I end up with two instances of J3 opened, and none of J1. "Re-"opening G1 would get the actual handle to the newly attached controller, but there's no current way to know this. This is clearly a bug or poor design in DirectInput or my wireless receiver drivers, but is a showstopping bug for my 8-20 player games (as soon as any one controller runs out of battery or goes to sleep and gets turned back on, suddenly things are busted requiring a restart (or, at least, a reinitialization of all controllers - the game can't go on)).

The solution I found is to use HID paths instead of GUIDs to uniquely identify joysticks. GUIDs are still needed to open a controller, however I have added code to re-find the GUIDs for all joysticks whenever a new joystick is attached or removed. This does now require opening of all joysticks (instead of just enumerating them), though if your app, like mine, is opening all of them anyway so that any can press a button to join, that doesn't change much (although perhaps they joysticks should be kept open in this case, instead of closed and re-opened). If your app only ever opens one joystick, this will do more work at startup than it did previously.

Sun, 13 Aug 2017 20:39:00 -0700Added check for XBOX in addition to Xbox and X-Box
Sam Lantinga [Sun, 13 Aug 2017 20:39:00 -0700] rev 11267
Added check for XBOX in addition to Xbox and X-Box

Sun, 13 Aug 2017 20:38:06 -0700Fixed compiler warning
Sam Lantinga [Sun, 13 Aug 2017 20:38:06 -0700] rev 11266
Fixed compiler warning

Sun, 13 Aug 2017 20:37:49 -0700Added SDL_wcscmp()
Sam Lantinga [Sun, 13 Aug 2017 20:37:49 -0700] rev 11265
Added SDL_wcscmp()

Sun, 13 Aug 2017 20:13:11 -0700Fixed copy-paste error, thanks Alen!
Sam Lantinga [Sun, 13 Aug 2017 20:13:11 -0700] rev 11264
Fixed copy-paste error, thanks Alen!

Sun, 13 Aug 2017 18:12:06 -0700Fixed bug 2812 - Make libSDL2main.a usable on Android via a dummy symbol
Sam Lantinga [Sun, 13 Aug 2017 18:12:06 -0700] rev 11263
Fixed bug 2812 - Make libSDL2main.a usable on Android via a dummy symbol

Jonas Kulla

This eliminates the need to manually compile in SDL_main_android.c.
Instead, add "-lSDL2main -Wl,-u,SDL_main_dummy" when linking.

I don't know how the nkd-build process works, but unless it was
for some reason linking libSDL2main.a it should be unaffected.

Sun, 13 Aug 2017 17:59:59 -0700Fixed bug 2839 - No way to create pre-built libraries for Android
Sam Lantinga [Sun, 13 Aug 2017 17:59:59 -0700] rev 11262
Fixed bug 2839 - No way to create pre-built libraries for Android

Mark Callow

README-android says to copy or link the SDL source tree to the jni folder in your Android project. It is not desirable to have to compile SDL with every application; furthermore the Android NDK has support for prebuilt libraries.

Attached is script (to be put in build-scripts) that builds the Android version of the libraries. The script builds both the existing SDL2 module and a new SDL2_main module. This is a static library containing the code from src/main/android/SDL_android_main.c. Also attached is a patch for Android.mk adding this module.

Note that when building an application's native .so using this prebuilt libSDL2main, you must use a link option, such as --whole-archive, that forces inclusion of the code in the .so because the functions in SDL_android_main are called only from Java.

Sun, 13 Aug 2017 14:15:52 -0700Fixed bug 2841 - Hint to set resource id for window icon
Sam Lantinga [Sun, 13 Aug 2017 14:15:52 -0700] rev 11261
Fixed bug 2841 - Hint to set resource id for window icon

Alexey

Seems to be a missing functionality. I want to set an icon from RC file. I cant pass MAKEINTRESOURCE(X) string to SDL_RegisterApp() cause string returned by MAKEINTRESOURCE string is not actually a string and SDL_strlen will crash. Moreover LoadImage seems to be loading wrong icon size. LoadIcon seems to be fine.

Sun, 13 Aug 2017 01:00:01 -0400x11: Patched to compile.
Ryan C. Gordon [Sun, 13 Aug 2017 01:00:01 -0400] rev 11260
x11: Patched to compile.