Sat, 22 Feb 2014 15:27:11 -0800Fixed bug 2414 - Execute event watchers in the order they were added
Sam Lantinga [Sat, 22 Feb 2014 15:27:11 -0800] rev 8234
Fixed bug 2414 - Execute event watchers in the order they were added

Leonardo

Event watchers are being executed on the inverse order they are added because they are added to the head of the SDL_event_watchers list.

Since watchers are allowed to change events before they are reported (they shouldn't, imo), this breaks code that rely on watcher execution order (such as distributed event handling).

An easy scenario to see this behaving weird to the user is if you add an event watcher to check mouse coordinates and check them again in your event loop. If you add the watcher after renderer's one (which always happens after you have initialized renderer), you get the same event but different coordinates.

The proposed patch adds the event watcher in the tail of the list, not in the beginning, and correctly fixes this problem.

Sat, 22 Feb 2014 15:23:09 -0800Fixed bug 2407 - Support for OpenGL ES 3 contexts on iOS
Sam Lantinga [Sat, 22 Feb 2014 15:23:09 -0800] rev 8233
Fixed bug 2407 - Support for OpenGL ES 3 contexts on iOS

Alex Szpakowski

Currently the UIKit/EAGL backend for SDL's OpenGL context creation API doesn't support OpenGL ES 3, despite iOS 7+ being capable (on devices with the necessary hardware.)

I have attached a patch to add support. It's also slightly more future-proof, so eventual OpenGL ES 4+ capability on iOS should hopefully work without requiring changes to SDL's UIKit/EAGL backend.

Sat, 22 Feb 2014 14:57:12 -0800Fixed bug 2346 - Mac: mousewheel events have flipped horizontal scroll values
Sam Lantinga [Sat, 22 Feb 2014 14:57:12 -0800] rev 8232
Fixed bug 2346 - Mac: mousewheel events have flipped horizontal scroll values

Alex Szpakowski

On my Mac OS X system (10.9.1), the SDL_MOUSEWHEEL event reports negative X values when my trackpad scrolls to the right, and positive X values when my trackpad scrolls to the left. This is backwards from what I'd expect, and I don't think it matches the Windows wheel events.

The vertical scroll values are what I'd expect though, and are consistent what gets reported on Windows (positive Y for scrolling up, negative Y for scrolling down.)

This is with "scroll direction: natural" disabled in the OS X trackpad settings (i.e. my scroll direction in non-SDL OS X programs matches what happens in Windows and Linux.)

I also tested with the horizontal scroll on a real mouse (Logitech G500 without custom drivers), and the horizontal scroll values in SDL are still flipped.

I "solved" the issue for myself by changing this line in the Cocoa_HandleMouseWheel function:

float x = [event deltaX];

to this:

float x = -[event deltaX];

I believe it should work fine with that change - I found something similar in another codebase while looking online for my issue - but I haven't tested on anything below Mac OS 10.8.

Sat, 22 Feb 2014 10:40:12 -0800Thou shalt not use more than 4k local variables in this code.
Sam Lantinga [Sat, 22 Feb 2014 10:40:12 -0800] rev 8231
Thou shalt not use more than 4k local variables in this code.

Sat, 22 Feb 2014 00:55:28 -0500Reworked Mac OS X joystick code to use the 10.5+ HID Manager API.
Ryan C. Gordon [Sat, 22 Feb 2014 00:55:28 -0500] rev 8230
Reworked Mac OS X joystick code to use the 10.5+ HID Manager API.

Besides being a little more simple to use than the earlier IOKit HID API, and
less likely to be deprecated, it also has the added benefit of working with
the Sony DualShock 4 controller in Bluetooth mode out of the box, whereas
the previous API has a bug that makes it report bad data for the
controller.

Cleaned up several other things in this code, having gone over every line of
it. The remaining deprecated calls are also gone.

Fri, 21 Feb 2014 08:37:57 -0300Fixes #2326, clean up the X11 backend a bit
Gabriel Jacobo [Fri, 21 Feb 2014 08:37:57 -0300] rev 8229
Fixes #2326, clean up the X11 backend a bit

Thu, 20 Feb 2014 21:07:56 -0800Fixed infinite recursion in D3D_Reset()
Sam Lantinga [Thu, 20 Feb 2014 21:07:56 -0800] rev 8228
Fixed infinite recursion in D3D_Reset()

Thu, 20 Feb 2014 17:03:55 -0300Fixes #2408, VS2013: several projects of release build are not built
Gabriel Jacobo [Thu, 20 Feb 2014 17:03:55 -0300] rev 8227
Fixes #2408, VS2013: several projects of release build are not built

Patch by Hiroyuki Iwatsuki

Thu, 20 Feb 2014 16:12:11 -0300Improve testgles2 exit behavior (useful on Android)
Gabriel Jacobo [Thu, 20 Feb 2014 16:12:11 -0300] rev 8226
Improve testgles2 exit behavior (useful on Android)

Wed, 19 Feb 2014 11:03:03 -0300Fixes #2403, add SDL2 dependency to testgles2 (thanks Hiroyuki Iwatsuki)
Gabriel Jacobo [Wed, 19 Feb 2014 11:03:03 -0300] rev 8225
Fixes #2403, add SDL2 dependency to testgles2 (thanks Hiroyuki Iwatsuki)