Wed, 02 Aug 2017 13:51:14 -0700kmsdrm: Fix leaking SDL_VideoDevice*
Brandon Schaefer <brandon.schaefer@canonical.com> [Wed, 02 Aug 2017 13:51:14 -0700] rev 11179
kmsdrm: Fix leaking SDL_VideoDevice*

Wed, 02 Aug 2017 13:38:46 -0700Fixed bug 3311 - Broken touch positions with SDL_RenderSetLogicalSize & HIGHDPI on iOS
Sam Lantinga <slouken@libsdl.org> [Wed, 02 Aug 2017 13:38:46 -0700] rev 11178
Fixed bug 3311 - Broken touch positions with SDL_RenderSetLogicalSize & HIGHDPI on iOS

Eric wing

Hi, I think I found a bug when using SDL_WINDOW_ALLOW_HIGHDPI with SDL_RenderSetLogicalSize on iOS. I use SDL_RenderSetLogicalSize for all my stuff. I just tried turning on SDL_WINDOW_ALLOW_HIGHDPI on iOS and suddenly all my touch/mouse positions are really broken/far-off-the-mark.

I actually don't have a real retina device (still) so I'm seeing this using the iOS simulator with a 6plus template.

Attached is a simple test program that can reproduce the problem. It uses RenderSetLogicalSize and draws some moving happy faces (to show the boundaries/space of the LogicalSize and that it is working correctly for that part).

When you click/touch, it will draw one more happy face where your button point is.

If you comment out SDL_WINDOW_ALLOW_HIGHDPI, everything works as expected. But if you compile with it in, the mouse coordinates seem really far off the mark. (Face appears far up and to the left.)


Alex Szpakowski on the mailing list suggests the problem is
"I believe this is a bug in SDL_Render’s platform-agnostic mouse coordinate scaling code. It assumes the units of the mouse coordinates are always in pixels, which isn’t the case where high-DPI is involved (regardless of whether iOS is used) – they’re actually in “DPI independent” coordinates (which matches the window size, but not the renderer output size)."

Additionally, if this is correct, the Mac under Retina is also probably affected too and "as well as any other platform SDL adds high-dpi support for in the future".

Wed, 02 Aug 2017 10:28:13 -0700Fixed bug 3722 - Fall back to xinerama/xvidmode if xrandr modes initialization fails
Sam Lantinga <slouken@libsdl.org> [Wed, 02 Aug 2017 10:28:13 -0700] rev 11177
Fixed bug 3722 - Fall back to xinerama/xvidmode if xrandr modes initialization fails

Levi Bard

In some environments, xrandr modes initialization can fail even though xrandr support is present and of a sufficient version.
(The one I encountered was an AWS instance running a virtual display)

The attached patch allows SDL to keep trying other methods if xrandr modes initialization fails (still subject to SDL_VIDEO_X11_REQUIRE_XRANDR).

Wed, 02 Aug 2017 10:24:47 -0700Fixed potential free of uninitialized memory (thanks Simon!)
Sam Lantinga <slouken@libsdl.org> [Wed, 02 Aug 2017 10:24:47 -0700] rev 11176
Fixed potential free of uninitialized memory (thanks Simon!)

Wed, 02 Aug 2017 10:22:48 -0700Fixed bug 3690 - SDL2 KMS/DRM render context support
Sam Lantinga <slouken@libsdl.org> [Wed, 02 Aug 2017 10:22:48 -0700] rev 11175
Fixed bug 3690 - SDL2 KMS/DRM render context support

Manuel

The attached patch adds support for KMS/DRM context graphics.

It builds with no problem on X86_64 GNU/Linux systems, provided the needed libraries are present, and on ARM GNU/Linux systems that have KMS/DRM support and a GLES2 implementation.
Tested on Raspberry Pi: KMS/DRM is what the Raspberry Pi will use as default in the near future, once the propietary DispmanX API by Broadcom is overtaken by open graphics stack, it's possible to boot current Raspbian system in KMS mode by adding "dtoverlay=vc4-kms-v3d" to config.txt on Raspbian's boot partition.
X86 systems use KMS right away in every current GNU/Linux system.

Simple build instructions:

$./autogen.sh
$./configure --enable-video-kmsdrm
$make

Mon, 31 Jul 2017 13:49:22 -0400x11: Make a separate unmapped window to own clipboard selections.
Ryan C. Gordon <icculus@icculus.org> [Mon, 31 Jul 2017 13:49:22 -0400] rev 11174
x11: Make a separate unmapped window to own clipboard selections.

Now the clipboard isn't lost if you destroy a specific SDL_Window, as it
works on other platforms. You will still lose the clipboard data on
SDL_Quit() or process termination, but that's X11 for you; run a
Clipboard Manager daemon.

Fixes Bugzilla #3222.
Fixes Bugzilla #3718.

Tue, 01 Aug 2017 20:16:10 -0700Fixed bug 3697 - Main thread gets stuck on left mouse down
Sam Lantinga <slouken@libsdl.org> [Tue, 01 Aug 2017 20:16:10 -0700] rev 11173
Fixed bug 3697 - Main thread gets stuck on left mouse down

Eric Wasylishen

I think I found a better fix.

The problem with https://hg.libsdl.org/SDL/rev/81e6d0f852fc is setting the styleMask to 0 clears the NSWindowStyleMaskFullScreen bit, which then confuses Cocoa later when you try to leave fullscreen. Instead I'm just clearing the NSWindowStyleMaskResizable bit, although SetWindowStyle(window, NSWindowStyleMaskFullScreen); seems to also work.

Tue, 01 Aug 2017 20:09:23 -0700Backed out changeset 81e6d0f852fc for bug 3697
Sam Lantinga <slouken@libsdl.org> [Tue, 01 Aug 2017 20:09:23 -0700] rev 11172
Backed out changeset 81e6d0f852fc for bug 3697

Eric Wasylishen

Unfortunately this commit seems to have broken exiting desktop-fullscreen.
- Launch testgl2.
- Press alt+enter to go fullscreen-desktop
- Press alt+enter again. The spinning cube will freeze, and the window stays fullscreen desktop.

Mon, 31 Jul 2017 12:57:15 -0700Fixed bug 3720 - SDL_GL_GetAttribute doesn't check for initialized video driver
Sam Lantinga <slouken@libsdl.org> [Mon, 31 Jul 2017 12:57:15 -0700] rev 11171
Fixed bug 3720 - SDL_GL_GetAttribute doesn't check for initialized video driver

Simon Hug

SDL_GL_GetAttribute doesn't check if a video driver has been initialized and will access the SDL_VideoDevice pointer, which is NULL at that point.

I think all of the attributes require an initialized driver, so a simple NULL check should fix it. Patch is attached.

Sun, 30 Jul 2017 14:36:01 -0400Disable static builds for static analysis.
Ryan C. Gordon <icculus@icculus.org> [Sun, 30 Jul 2017 14:36:01 -0400] rev 11170
Disable static builds for static analysis.

There's really no sense in analyzing everything twice, and this makes the
job finish significantly faster.