Sun, 13 Aug 2017 14:15:52 -0700Fixed bug 2841 - Hint to set resource id for window icon
Sam Lantinga <slouken@libsdl.org> [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 <icculus@icculus.org> [Sun, 13 Aug 2017 01:00:01 -0400] rev 11260
x11: Patched to compile.

Sun, 13 Aug 2017 00:58:23 -0400x11: Fix message box titles with Unicode chars on some window managers.
Ryan C. Gordon <icculus@icculus.org> [Sun, 13 Aug 2017 00:58:23 -0400] rev 11259
x11: Fix message box titles with Unicode chars on some window managers.

Fixes Bugzilla #2971.

Sat, 12 Aug 2017 20:25:49 -0700Fixed bug 2931 - Large relative mouse motion jumps when using touch input
Sam Lantinga <slouken@libsdl.org> [Sat, 12 Aug 2017 20:25:49 -0700] rev 11258
Fixed bug 2931 - Large relative mouse motion jumps when using touch input

Sat, 12 Aug 2017 20:21:34 -0700Added test debug logs for additional event types
Sam Lantinga <slouken@libsdl.org> [Sat, 12 Aug 2017 20:21:34 -0700] rev 11257
Added test debug logs for additional event types

Sat, 12 Aug 2017 22:16:04 -0300iOS: Fix app orientation when creating a landscape fullscreen window with the device currently in portrait orientation.
Alex Szpakowski <slime73@gmail.com> [Sat, 12 Aug 2017 22:16:04 -0300] rev 11256
iOS: Fix app orientation when creating a landscape fullscreen window with the device currently in portrait orientation.

Sat, 12 Aug 2017 17:41:59 -0700Fixed bug 2950 - wrong axes values are set on joystick initialization
Sam Lantinga <slouken@libsdl.org> [Sat, 12 Aug 2017 17:41:59 -0700] rev 11255
Fixed bug 2950 - wrong axes values are set on joystick initialization

Edward Rudd

Device: Logitech Rumble Gamepad F510 in Xinput mode.

Upon opening the joystick the values of the axes are queried via PollAllValues are not actually set on the device all the time.

This can easily be seen in the testjoystick or testgamecontroller test programs,as the testjoystick shows all axes in the center until one 'tickles' the triggers., and the testgamecontroller will show the triggers as 'on' until on 'tickles' the triggers.

Upon further research the culprit is the SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS hint. In the default value events are ignored until there is an active window, Thus in cases where the joystick system is initialized and controllers opened before the initial window is created & focuses, the initial values will be incorrect.

Here is my current workaround in the game I'm working on porting..

SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
SDL_GameController* gamepad = SDL_GameControllerOpen(index);
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "0");

Sat, 12 Aug 2017 17:01:14 -0700Fixed Windows build
Sam Lantinga <slouken@libsdl.org> [Sat, 12 Aug 2017 17:01:14 -0700] rev 11254
Fixed Windows build

Sat, 12 Aug 2017 16:59:00 -0700Fixed bug 2979 - SDL_ConvertSurface does not convert color keys consistently
Sam Lantinga <slouken@libsdl.org> [Sat, 12 Aug 2017 16:59:00 -0700] rev 11253
Fixed bug 2979 - SDL_ConvertSurface does not convert color keys consistently

Edmund Horner

When a 16-bit "565 format" surface has a colour key set, it will blit with correct transparency. If, however, it has its colour key set then is converted to a 32-bit ARGB format surface, the colour key in the converted image will not necessarily be the same pixel value as the transparent pixels. It may not blit correctly, because the colour key does not match the right pixels.

In my case, with an image using 0xB54A for transparency, the colour key was converted to 180,170,82; but the corresponding pixels (with the same original value) were converted to 180,169,82. Blitting the converted image did not use transparency where expected.

I have attached a test case. The bug has been replicated on both x86_64 Linux (SDL 2.0.2), and 32-bit MS C++ 2010 on Windows (SDL 2.0.0).

Sat, 12 Aug 2017 16:48:46 -0700Workaround for bug 3049 - SDL_Init(SDL_INIT_VIDEO) - XDM authorization key matches an existing client!
Sam Lantinga <slouken@libsdl.org> [Sat, 12 Aug 2017 16:48:46 -0700] rev 11252
Workaround for bug 3049 - SDL_Init(SDL_INIT_VIDEO) - XDM authorization key matches an existing client!

malferit

Hello, I began a little program with SDL2 on Linux in C, and when I call SDL_Init(SDL_INIT_VIDEO) I get an error and this is printed in the console:

XDM authorization key matches an existing client!

I searched through Internet, and found that some people suggest to run 'xhost +' or to specify this in /etc/X11/xdm/xdm-config:

DisplayManager*authName: MIT-MAGIC-COOKIE-1

I don't think an end user needs to know that...

But what bothered me is that first I started this little program in Pascal using the Freepascal compiler and it works. In freepascal you only use some thin header bindings in Pascal and then it links with the dynamic SDL library, so I don't understood why it worked with Freepascal and not in C.

I run ldd to the two generated applications:

Application in C:

linux-gate.so.1 (0xffffe000)
libSDL2-2.0.so.0 => /usr/lib/libSDL2-2.0.so.0 (0xb76ac000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb766e000)
libc.so.6 => /lib/libc.so.6 (0xb74e2000)
libm.so.6 => /lib/libm.so.6 (0xb74a0000)
libdl.so.2 => /lib/libdl.so.2 (0xb749a000)
librt.so.1 => /lib/librt.so.1 (0xb7491000)
/lib/ld-linux.so.2 (0xb77b3000)

Application compiled with Freepascal:

linux-gate.so.1 (0xffffe000)
libSDL2-2.0.so.0 => /usr/lib/libSDL2-2.0.so.0 (0xb762a000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb74f3000)
libc.so.6 => /lib/libc.so.6 (0xb7367000)
libm.so.6 => /lib/libm.so.6 (0xb7325000)
libdl.so.2 => /lib/libdl.so.2 (0xb731f000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7305000)
librt.so.1 => /lib/librt.so.1 (0xb72fc000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb72dc000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb72d9000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb72d3000)
/lib/ld-linux.so.2 (0xb7755000)

It seems that Freepascal is linking with libX11, libxcb, libXau and libXdmcp .

Linking my C application with libxcb solved the problem (linking with libXau and/or libXdmcp without libxcb didn't work). Linking with X11 links all the other libraries and works as well.

So I fill this bug report mainly to let you know about this. I don't know if it is a problem that can be solved on the libSDL side or not, but at least I hope it will help.

Hi, some tests:

1. Disabled XDM. Login in console and running 'startx'. The program works without having to link with X11.

2. Enabled XDM. Added 'DisplayManager*authName: MIT-MAGIC-COOKIE-1' to /etc/X11/xdm/xdm-config.The program works without having to link with X11.

3. Enabled XDM without 'DisplayManager*authName: MIT-MAGIC-COOKIE-1' in /etc/X11/xdm/xdm-config . I get the authentication error unless I link with X11.