Sun, 19 May 2019 23:29:50 -0400vulkan: Patched to compile on Visual Studio.
Ryan C. Gordon <icculus@icculus.org> [Sun, 19 May 2019 23:29:50 -0400] rev 12742
vulkan: Patched to compile on Visual Studio.

Sun, 19 May 2019 20:25:02 -0400Patched to compile in C89 mode.
Ryan C. Gordon <icculus@icculus.org> [Sun, 19 May 2019 20:25:02 -0400] rev 12741
Patched to compile in C89 mode.

Sun, 19 May 2019 12:06:58 -0700Fixed bug 4474 - Add support for an ASUS Gamepad variation
Sam Lantinga <slouken@libsdl.org> [Sun, 19 May 2019 12:06:58 -0700] rev 12740
Fixed bug 4474 - Add support for an ASUS Gamepad variation

Trent Gamblin

This patch adds a variation of the ASUS Gamepad to the game controller DB. All the values are the same except the GUID.

Sun, 19 May 2019 12:04:06 -0700Fixed bug 4469 - make SDL_CreateTextureFromSurface pick a more appropriate format
Sam Lantinga <slouken@libsdl.org> [Sun, 19 May 2019 12:04:06 -0700] rev 12739
Fixed bug 4469 - make SDL_CreateTextureFromSurface pick a more appropriate format

Sylvain

Currently SDL_CreateTextureFromSurface picks first valid format, and do a conversion.

format = renderer->info.texture_formats[0];
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
if (!SDL_ISPIXELFORMAT_FOURCC(renderer->info.texture_formats[i]) &&
SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == needAlpha) {
format = renderer->info.texture_formats[i];
break;

It could try to find a better format, for instance :

if SDL_Surface has no Amask, but a colorkey :
if surface fmt is RGB888, try to pick ARGB8888 renderer fmt
if surface fmt is BGR888, try to pick ABGR8888 renderer fmt
else
try to pick the same renderer format as surface fmt

if no format has been picked, use the fallback.


I think it goes with bug 4290 fastpath BlitNtoN
when you expand a surface with pixel format of size 24 to 32, there is a fast path possible.


So with this issue:

- if you have a surface with colorkey (RGB or BGR, not palette), it takes a renderer format where the conversion is faster.
(it avoids, if possible, RGB -> ABGR which means switching RGB to BGR)

- if you have a surface ABGR format, it try to take the ABGR from the renderer.
(it avoids, if possible, ABGR -> ARGB, which means switch RGB to BGR)

Sun, 19 May 2019 11:56:26 -0700Fixed bug 4436 - [OpenBSD] fix D-pad
Sam Lantinga <slouken@libsdl.org> [Sun, 19 May 2019 11:56:26 -0700] rev 12738
Fixed bug 4436 - [OpenBSD] fix D-pad

Thomas Frohwein

Hi,

If a gamepad lists the Dpad as 4 buttons (Dpad Up,Down, Left, Right) like with the Xbox 360 gamepad / XInput report descriptor used by OpenBSD (https://github.com/openbsd/src/blob/master/sys/dev/usb/uhid_rdesc.h#L184), this is not recognized by the SDL BSD backend and no hat or any other listing for the D-pad exists, e.g. in sdl2-jstest (https://gitlab.com/sdl-jstest/sdl-jstest).

The attached diff fixes this and makes the D-pad on my Xbox 360 and Logitech F310 controllers usable. It adds a hat to nhats when usage HUG_DPAD_UP is found, reads the state of the D-pad buttons into array dpad[], and turns the value of dpad[] into an SDL hat direction (dpad_to_sdl()).

Tested and works with Xbox 360 controller and Logitech F310 in XInput mode. Software-side tested with sdl2-jstest and Owlboy where this worked without problems or regressions.

I don't know if this would be applicable to other *BSDs and don't have an install to test it with, therefore wrapped it in __OpenBSD__ ifdefs.

Thanks,

thfr

Mon, 03 Dec 2018 20:14:35 +0200Fix WORKING_DIR parameter
Serhii Charykov <laammaar@gmail.com> [Mon, 03 Dec 2018 20:14:35 +0200] rev 12737
Fix WORKING_DIR parameter

Sun, 19 May 2019 11:52:25 -0700Fixed bug 4401 - SDL_GetWindowPosition() wrong after SDL_SetWindowPosition() until window is moved on macOS
Sam Lantinga <slouken@libsdl.org> [Sun, 19 May 2019 11:52:25 -0700] rev 12736
Fixed bug 4401 - SDL_GetWindowPosition() wrong after SDL_SetWindowPosition() until window is moved on macOS

Removed incorrect call to SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y);
If the position of the window isn't adjusted in the SetWindowPosition() call, then sending the window event would have no effect because x and y equals the window x and y. If the position of the window is adjusted in the SetWindowPosition() call, then we don't want to clobber it with values that the user passed in.

Sun, 19 May 2019 11:01:36 -0700Fixed bug 4025 - SDL_Renderer OpenGL : add support for textures ABGR, RGB, BGR
Sam Lantinga <slouken@libsdl.org> [Sun, 19 May 2019 11:01:36 -0700] rev 12735
Fixed bug 4025 - SDL_Renderer OpenGL : add support for textures ABGR, RGB, BGR

Sylvain

OpenGLES2 SDL renderer has support for textures ARGB, ABGR, RGB and BGR, whereas OpenGL SDL renderer only had ARGB.

If you think it's worth adding it, here's a patch. I quickly tried and it worked, but there may be missing things or corner case.

Sun, 19 May 2019 10:44:14 -0700Fixed bug 3911 - SYSWM generic X11 events missing event data
Sam Lantinga <slouken@libsdl.org> [Sun, 19 May 2019 10:44:14 -0700] rev 12734
Fixed bug 3911 - SYSWM generic X11 events missing event data

Andrei Drexler

For X11 GenericEvents, the associated data is only available between a call to XGetEventData and the matching XFreeEventData, i.e. in X11_HandleGenericEvent. Trying to call XGetEventData a second time on the same event will fail, so an application that wants to inspect XInput2 events (e.g. for stylus pressure) has no way of retrieving its data from queued SYSWM events.

The attached patch (based on SDL-2.0.7-11629) sends SYSWM messages from X11_HandleGenericEvent while the data is still available, allowing client code to register an event filter/watcher and process the event inside the callback.

Sun, 19 May 2019 10:36:44 -0700video: Add Vulkan support for vivante fb
"Wladimir J. van der Laan" <laanwj@gmail.com> [Sun, 19 May 2019 10:36:44 -0700] rev 12733
video: Add Vulkan support for vivante fb
Vivante drivers use the VK_KHR_display extension for rendering directly
to the frame buffer. This patch adds support to the video driver for
Vulkan rendering using that method.

- Add an utility function SDL_Vulkan_Display_CreateSurface that creates
a surface using this extension. The display to use (if there are
multiple) can be overridden using the environment variable
"SDL_VULKAN_DISPLAY".

- Use this function in a new compilation unit SDL_vivantevideo.c,
which implements the SDL_VIDEO_VULKAN methods of the driver structure.