Tue, 16 Jun 2015 00:57:45 -0400Haptic/Linux: Keep track of device numbers properly to track duplicates.
Ryan C. Gordon <icculus@icculus.org> [Tue, 16 Jun 2015 00:57:45 -0400] rev 9743
Haptic/Linux: Keep track of device numbers properly to track duplicates.

Fixes Bugzilla #3014.

Sun, 14 Jun 2015 19:26:20 -0700Fixed style
Sam Lantinga <slouken@libsdl.org> [Sun, 14 Jun 2015 19:26:20 -0700] rev 9742
Fixed style

Sun, 14 Jun 2015 19:25:12 -0700Fixed bug 3012 - Android accelerometer joystick axis values overflow when values from Android are larger than gravity
Sam Lantinga <slouken@libsdl.org> [Sun, 14 Jun 2015 19:25:12 -0700] rev 9741
Fixed bug 3012 - Android accelerometer joystick axis values overflow when values from Android are larger than gravity

Magnus Bjerke Vik

This causes issues when for instance using the joystick API to make an Android phone rotate an object by rotating the phone. When the absolute value of an axis reported by android is larger than earth gravity, SDL will overflow the Sint16 value used for joystick axes, causing sporadic movements when close to the gravity. Just holding the phone so that e.g. Y points directly upwards will make it unstable, and even more if you just tap the phone gently from below (increasing the acceleration).

More detailed: SDLActivity gets the accelerometer values in onSensorChanged and divides each axis by earth gravity. SDL_SYS_JoystickUpdate takes each of the axis values, multiplies them by 32767.0 (largest Sint16), and the casts them to Sint16. From this you can see that any value from Android that exceeds earth gravity will overflow the joystick axis.

A fix is to clamp the values so that they won't overflow the Sint16.

Sun, 14 Jun 2015 19:21:13 -0700Fixed bug 2953 - Crash due to a bad cleanup in the SDL_SYS_HapticQuit function
Sam Lantinga <slouken@libsdl.org> [Sun, 14 Jun 2015 19:21:13 -0700] rev 9740
Fixed bug 2953 - Crash due to a bad cleanup in the SDL_SYS_HapticQuit function

Technically this is caused by the haptic devices not being closed at quit time, which we need to fix anyway, but this is a bandaid for now.

Sun, 14 Jun 2015 19:10:51 -0700Fixed bug 2908 - Fix clang warnings
Sam Lantinga <slouken@libsdl.org> [Sun, 14 Jun 2015 19:10:51 -0700] rev 9739
Fixed bug 2908 - Fix clang warnings

Simon Deschenes

My build system still shows warning as errors.

The first warning says that the member named instances can never be false (or NULL) as it is a static array, and we should check for instances[index] which we do anyway.

Sun, 14 Jun 2015 18:57:05 -0700Only use explicit inlining - otherwise Visual Studio 2010 will inline SDL_zero(info) in SDL_vsnprintf() into a memset() call when compiling the Release x64 configuration.
Sam Lantinga <slouken@libsdl.org> [Sun, 14 Jun 2015 18:57:05 -0700] rev 9738
Only use explicit inlining - otherwise Visual Studio 2010 will inline SDL_zero(info) in SDL_vsnprintf() into a memset() call when compiling the Release x64 configuration.

Sun, 14 Jun 2015 18:37:43 -0700Fixed 2010 solution and removed Release_NoSTDIO build configuration
Sam Lantinga <slouken@libsdl.org> [Sun, 14 Jun 2015 18:37:43 -0700] rev 9737
Fixed 2010 solution and removed Release_NoSTDIO build configuration

Sun, 14 Jun 2015 18:21:04 -0700Updated Visual Studio projects
Sam Lantinga <slouken@libsdl.org> [Sun, 14 Jun 2015 18:21:04 -0700] rev 9736
Updated Visual Studio projects
There is now a single solution used by Visual Studio 2010 and newer

Sun, 14 Jun 2015 20:15:36 -0400WinRT: made sure build script generates Release-built binaries, by default
David Ludwig <dludwig@pobox.com> [Sun, 14 Jun 2015 20:15:36 -0400] rev 9735
WinRT: made sure build script generates Release-built binaries, by default

winrtbuild.bat/.ps1 were generating Debug-built binaries, in some cases.
This change makes sure that Release mode is the default.

Sat, 13 Jun 2015 13:36:47 -0700Fixed bug 3011 - pthread/SDL_syssem.c requires _GNU_SOURCE
Sam Lantinga <slouken@libsdl.org> [Sat, 13 Jun 2015 13:36:47 -0700] rev 9734
Fixed bug 3011 - pthread/SDL_syssem.c requires _GNU_SOURCE

Ozkan Sezer

pthread/SDL_syssem.c requires _GNU_SOURCE predefined (like SDL_sysmutex.c),
otherwise sem_timedwait() prototype might not be available to it. Problem
seen with glibc-2.3.4.