Mon, 24 Feb 2014 11:24:48 -0500CMake: Fixed build on Mac OS X.
Ryan C. Gordon <icculus@icculus.org> [Mon, 24 Feb 2014 11:24:48 -0500] rev 8248
CMake: Fixed build on Mac OS X.

Mon, 24 Feb 2014 10:25:02 -0300Zero out haptic linked list items on creation
Gabriel Jacobo <gabomdq@gmail.com> [Mon, 24 Feb 2014 10:25:02 -0300] rev 8247
Zero out haptic linked list items on creation

(thanks to Turo Lamminen for the report!)

Mon, 24 Feb 2014 10:00:10 -0300Fixes #2417, memory leak in SDL_gamecontroller.c (thanks Leonardo!)
Gabriel Jacobo <gabomdq@gmail.com> [Mon, 24 Feb 2014 10:00:10 -0300] rev 8246
Fixes #2417, memory leak in SDL_gamecontroller.c (thanks Leonardo!)

Sun, 23 Feb 2014 01:24:46 -0500Free the correct variable.
Ryan C. Gordon <icculus@icculus.org> [Sun, 23 Feb 2014 01:24:46 -0500] rev 8245
Free the correct variable.

Sun, 23 Feb 2014 01:10:33 -0500CMake: Just assume Apple platforms have Cocoa support.
Ryan C. Gordon <icculus@icculus.org> [Sun, 23 Feb 2014 01:10:33 -0500] rev 8244
CMake: Just assume Apple platforms have Cocoa support.

Fixes Bugzilla #2056.

Sat, 22 Feb 2014 21:21:33 -0500Fixed Mac DualShock 4 gamecontroller db entry again.
Ryan C. Gordon <icculus@icculus.org> [Sat, 22 Feb 2014 21:21:33 -0500] rev 8243
Fixed Mac DualShock 4 gamecontroller db entry again.

Sat, 22 Feb 2014 21:15:34 -0500Mac joystick: ignore duplicate HID elements.
Ryan C. Gordon <icculus@icculus.org> [Sat, 22 Feb 2014 21:15:34 -0500] rev 8242
Mac joystick: ignore duplicate HID elements.

The DualShock 4 has all elements listed twice: once in the top-level list of
elements, and once in an "Application Collection" element at the top-level.

Each element has a proper cookie with a unique value, so now we descend into
each element collections, but before we add an element to the device's list,
we make sure we don't already have one with that cookie, probably from
another collection or a buggy device.

Sat, 22 Feb 2014 19:10:45 -0800Fixed bug 2404 - CPU detection not working with MSVC on x64
Sam Lantinga <slouken@libsdl.org> [Sat, 22 Feb 2014 19:10:45 -0800] rev 8241
Fixed bug 2404 - CPU detection not working with MSVC on x64

Tiemo Jung

All CPU detection functions SDL_Has* will return false, even if it is supported by the CPU, if SDL is compiled with MSVC and the target is x64.

The reason for this is that 'CPU_haveCPUID' will return 0 and macro 'cpuid' in SDL_cpuinfo.c is the fallback implementation, which sets all params to zero.

It is safe to assume that cpuid is supported on a CPU that runs windows x64, so CPU_haveCPUID can just return 1, and the empty macro can be replaced with a small wrap around the __cpuid intrinsic.

Sat, 22 Feb 2014 18:01:18 -0800Fixed bug 2335 - Fails to build on Debian GNU/kFreeBSD
Sam Lantinga <slouken@libsdl.org> [Sat, 22 Feb 2014 18:01:18 -0800] rev 8240
Fixed bug 2335 - Fails to build on Debian GNU/kFreeBSD

Felix Geyer

Starting from version 2.0.1 libsdl fails to build on Debian GNU/kFreeBSD in SDL_cpuinfo.c.

GNU/kFreeBSD defines __FreeBSD_kernel__ but not __FreeBSD__.
The #ifdef __FreeBSD__ check should be extended for __FreeBSD_kernel__, see the attached patch.

Build log:
libtool: compile: gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -DUSING_GENERATED_CONFIG_H -Iinclude -I/«BUILDDIR»/libsdl2-2.0.1+dfsg1/include -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -D_REENTRANT -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-kfreebsd-gnu/dbus-1.0/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -Wall -c /«BUILDDIR»/libsdl2-2.0.1+dfsg1/src/cpuinfo/SDL_cpuinfo.c -fPIC -DPIC -o build/.libs/SDL_cpuinfo.o
/«BUILDDIR»/libsdl2-2.0.1+dfsg1/src/cpuinfo/SDL_cpuinfo.c: In function 'SDL_GetSystemRAM':
/«BUILDDIR»/libsdl2-2.0.1+dfsg1/src/cpuinfo/SDL_cpuinfo.c:632:35: error: 'HW_MEMSIZE' undeclared (first use in this function)
int mib[2] = {CTL_HW, HW_MEMSIZE};
^
/«BUILDDIR»/libsdl2-2.0.1+dfsg1/src/cpuinfo/SDL_cpuinfo.c:632:35: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [build/SDL_cpuinfo.lo] Error 1

Sat, 22 Feb 2014 17:55:58 -0800Fixed bug 2347 - On OSX, an SDL app prevents system shutdown.
Sam Lantinga <slouken@libsdl.org> [Sat, 22 Feb 2014 17:55:58 -0800] rev 8239
Fixed bug 2347 - On OSX, an SDL app prevents system shutdown.

Tim McDaniel

On OSX, an SDL app forces a system shutdown to be cancelled. This happens because [SDLAppDelegate applicationShouldTerminate] returns NSTerminateCancel. A better approach is to subclass NSApplication and override terminate to do nothing except call SDL_SendQuit. In response to a system shutdown notification, this allows the normal SDL Quit event processing to occur, and if the app then terminates, system shutdown occurs normally. Please see the attached patch, based on SDL 2.0.1.