Sat, 27 Jul 2013 03:22:37 -0700Fixed variable scoping for Windows build
Sam Lantinga [Sat, 27 Jul 2013 03:22:37 -0700] rev 7527
Fixed variable scoping for Windows build

Sat, 27 Jul 2013 03:20:09 -0700Fixed bug 1272 - Bogus numlock key up/down events being reported on MacOS X
Sam Lantinga [Sat, 27 Jul 2013 03:20:09 -0700] rev 7526
Fixed bug 1272 - Bogus numlock key up/down events being reported on MacOS X

Vern Jensen

The problem is that in certain situations I'm getting THREE keyUp/keyDown events when I push certain keys.

In my event code I added:

case SDL_KEYUP:

printf("SDL KeyScanCode for KEYUP event: %d\n", event->key.keysym.scancode );


and

case SDL_KEYDOWN:

printf("SDL KeyScanCode for KEYDOWN event: %d\n", event->key.keysym.scancode );


The result of one test run where I push 2 keys and then release them is this:

SDL KeyScanCode for KEYDOWN event: 92 // Pushed keypad 4
SDL KeyScanCode for KEYDOWN event: 83 // Pushed left shift
SDL KeyScanCode for KEYUP event: 83
SDL KeyScanCode for KEYDOWN event: 225
SDL KeyScanCode for KEYUP event: 92 // Released keypad 4
SDL KeyScanCode for KEYDOWN event: 83
SDL KeyScanCode for KEYUP event: 83
SDL KeyScanCode for KEYUP event: 225 // Released left shift

There *should* be only a total of 4 events above… 2 for each key being pushed, and 2 for each being released. But instead some bogus events for numlock being pushed/released are sent from SDL. These events did not occur. I did not push numlock. The value above for numlock is 83. Comments above show when I pushed each key. As you can see, when I push left shift, THREE events are instantly sent to my application, keyDown and then keyUp for numlock, and then the valid event for left shift (the key that was actually pushed).

You could replace keypad 4 with pretty much any keyPad key and it'll still happen. You can also replace it with any arrow key and it'll happen. However, when trying it with normal letter keys on the main keyboard it didn't.

It happens with other modifier keys too, not just left shift.

The order in which the keys are pressed matter. For instance, if I do:

1) keypad 4
2) left shift
3) release left shift
4) release keypad 4

Then at step 2, I get the 3 events above (when there should be only one), but steps 3 and 4 work properly… I don't get extra keyUp/keyDown events for steps 3 or 4. Thereas if the order of steps 3 and 4 are reversed, I get the bogus extra events for numlock.

Also, the problem can occur even when pushing just a single key by itself. If I push left shift, then keypad 4, then release left shift, then release keypad 4, then the following push of left shift will cause the bug. If I continue pushing and releasing left shift though, it won't happen again until I again involve keypad keys.

---

Sam Lantinga

According to the Apple documentation, NSNumericPadKeyMask is set for any arrow or numeric keypad event. Indeed this is what's happening.

I verified that we get the correct events for the numlock key and the mod state gets set correcly, so it should be safe to remove this bogus code.

Sat, 27 Jul 2013 02:50:19 -0700Fixed bug 1743 - CMake produces libraries with wrong filename/SONAME
Sam Lantinga [Sat, 27 Jul 2013 02:50:19 -0700] rev 7525
Fixed bug 1743 - CMake produces libraries with wrong filename/SONAME

David Gow

As discussed on the list, the autotools build backend uses libtool's "release" option, giving us the SONAME libSDL2-2.0.so.0, whereas CMake doesn't, giving us libSDL2.so.0

While libSDL2.so.0 has some small advantages (being simpler and matching the names on some other OSes better), many products have already been developed expecting libSDL2-2.0.so.0, which better matches SDL 1.2's SONAME. It seems clear, therefore, that most developers prefer this name.

This patch emulates libtool's functionality, making libSDL2-2.0.so.0 the name of the shared library, while leaving libSDL2.a as the filename of the static library. Unlike with libtool, no libSDL2.so symlink is yet made. I also haven't tested this on anything but Linux, so it might break other platforms. :/

Sat, 27 Jul 2013 02:45:26 -0700Improved error checking in the haptic system, preventing crashes in some cases.
Sam Lantinga [Sat, 27 Jul 2013 02:45:26 -0700] rev 7524
Improved error checking in the haptic system, preventing crashes in some cases.

Edgar Simo 2012-05-06 02:33:39 EDT

I recall that driver being buggy back in the day, but looking over the code there's a number of things being done wrong which I've fixed and it should now properly error out instead of crashing. Also make sure you initialize the haptic subsystem before using haptic commands (which I now more explicitly try to enforce).

Sun, 14 Jul 2013 18:17:28 -0700Fixed bug 1919 - Window icon disappears as soon as a renderer is created
Sam Lantinga [Sun, 14 Jul 2013 18:17:28 -0700] rev 7523
Fixed bug 1919 - Window icon disappears as soon as a renderer is created

Sebastian

Setting a window icon works just fine until a renderer is added to the window.
After adding the renderer the icon disappears.

Reproduce by:
- Take the example code from the wiki: http://wiki.libsdl.org/moin.fcg/SDL_SetWindowIcon

- Add the following two lines after SDL_FreeSurface(surface);
SDL_Delay(1000);
SDL_Renderer* ren = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);

-compile and run

You will see the window icon correctly at first. After the Delay the Icon will disappear.

Sat, 27 Jul 2013 00:49:34 -0700Fixed bug 1526 - X11 - XUnmapWindow should not be called directly
Sam Lantinga [Sat, 27 Jul 2013 00:49:34 -0700] rev 7522
Fixed bug 1526 - X11 - XUnmapWindow should not be called directly

driedfruit

In X11_HideWindow, we call XUnmapWindow to unmap. According to ICCCN2.0, this should never happen, and XWithdrawWindow should be called instead.

http://www.tronche.com/gui/x/icccm/sec-4.html#s-4.1.4

"The reason for requiring the client to send a synthetic UnmapNotify event is to ensure that the window manager gets some notification of the client's desire to change state, ***even though the window may already be unmapped when the desire is expressed***."

Additionally, this can be observed at http://cgit.freedesktop.org/xorg/lib/libX11/tree/src/Withdraw.c#n65

Failure to comply leads to "MapNotify" event never appearing on non-reparenting WMs after subsequent show-hide-show requests. (I'm currently observing this behavior, thus my bug report).

Fri, 26 Jul 2013 13:30:24 -0700Fix cmake breakage (thanks Marcus)
Jørgen P. Tjernø [Fri, 26 Jul 2013 13:30:24 -0700] rev 7521
Fix cmake breakage (thanks Marcus)

My recent change broke the sdlcheck.cmake by not escaping some quotes properly.
Thanks to Marcus von Appen for pointing it out and providing the patch.

Fri, 26 Jul 2013 12:37:36 -0300Consider the case where an attribute is set to EGL_DONT_CARE in eglChooseConfig
Gabriel Jacobo [Fri, 26 Jul 2013 12:37:36 -0300] rev 7520
Consider the case where an attribute is set to EGL_DONT_CARE in eglChooseConfig
SDL doesn't currently use EGL_DONT_CARE, but it doesn' hurt to future proof.

Fri, 26 Jul 2013 12:22:40 -0300[Android] Bug 1827, select the best matching config provided by eglChooseConfig
Gabriel Jacobo [Fri, 26 Jul 2013 12:22:40 -0300] rev 7519
[Android] Bug 1827, select the best matching config provided by eglChooseConfig

Thu, 25 Jul 2013 18:11:09 -0700Fixed crash and garbled output when converting from F32 to S16 audio.
Sam Lantinga [Thu, 25 Jul 2013 18:11:09 -0700] rev 7518
Fixed crash and garbled output when converting from F32 to S16 audio.