Fri, 11 Aug 2017 10:32:47 -0700Fixed bug 3682 - Toggle text input in checkkeys when the mouse is clicked
Sam Lantinga <slouken@libsdl.org> [Fri, 11 Aug 2017 10:32:47 -0700] rev 11220
Fixed bug 3682 - Toggle text input in checkkeys when the mouse is clicked

Eric Wasylishen

Small change to checkkeys so you can toggle text input mode with a mouse click.
This is needed for testing how dead keys react to toggling mouse input, i.e. these bugs:

Fri, 11 Aug 2017 10:21:19 -0700Fixed bug 3702 - Clear error messages of SDL_LoadObject for optional libraries
Sam Lantinga <slouken@libsdl.org> [Fri, 11 Aug 2017 10:21:19 -0700] rev 11219
Fixed bug 3702 - Clear error messages of SDL_LoadObject for optional libraries

Simon Hug

Some code in SDL loads libraries with SDL_LoadObject to get more information or use newer APIs. SDL_LoadObject may fail, set an error message and SDL will continue with some fallback code. Since SDL will overwrite the error or exit the function with a return value that indicates success, the error form SDL_LoadObject for the optional stuff might as well be cleared right away.

Fri, 11 Aug 2017 10:18:45 -0700Fixed bug 3714 - Windows: SDL_WINDOW_FULLSCREEN_DESKTOP broken on 3 monitor setup w/ DPI scaling
Sam Lantinga <slouken@libsdl.org> [Fri, 11 Aug 2017 10:18:45 -0700] rev 11218
Fixed bug 3714 - Windows: SDL_WINDOW_FULLSCREEN_DESKTOP broken on 3 monitor setup w/ DPI scaling

Eric Wasylishen 2017-07-26 18:42:58 UTC
I set up an (admittedly exotic) 3-monitor setup, and when I enter fullscreen-desktop on the middle display (#2), the SDL window is off center. (covers half of monitor #2 and most of monitor #3).

The displays are arranged from left to right:

Display #1 (main): 2880x1800, 200% scaling
Display #2: 1920x1200, 150% scaling
Display #3: 1920x1080, 100% scaling

SDL display bounds:
INFO: Bounds: 1440x900 at 0,0
INFO: Bounds: 1281x801 at 1921,0 (these are incorrect)
INFO: Bounds: 1920x1080 at 4800,0

Correct bounds reported by calling EnumDisplayMonitors and printing the LPRECT param of the callback:
1440x900 at (0, 0)
1280x800 at (2880, 0)
1920x1080 at (4800, 0)

It seems like you need 3 displays to reproduce this, and the left two need DPI scaling, and the 3rd display needs to have a different scale factor than the others.

Related: https://bugzilla.libsdl.org/show_bug.cgi?id=3709

SDL: current hg (11235:43c7baa53681)
Windows 10, Version 10.0.15063 Build 15063
Tested with testdraw2 and testgl2, and pressing alt+enter to enter fullscreen desktop.

This patch reworks SDL_windowsmodes.c to use EnumDisplayMonitors instead of EnumDisplayDevices, so we always have an HMONITOR for each SDL display.

With access to an HMONITOR, we can get the monitor bounds in virtual screen coordinates the proper way, by calling GetMonitorInfo. (whereas the original code was doing some calculations - e.g. "data->DeviceMode.dmPosition.x * data->ScaleX" - to try to get virtual screen coordinates. These worked in simple cases, but failed in more complex cases like this bug)

The one potential problem with my patch is, the ChangeDisplaySettingsEx docs say that you're supposed to get the display name from EnumDisplayDevices, but I'm getting the display name from GetMonitorInfo now.

Fri, 11 Aug 2017 10:05:45 -0700Fixed bug 3723 - Possible double free in kmsdrm init code on certain errors
Sam Lantinga <slouken@libsdl.org> [Fri, 11 Aug 2017 10:05:45 -0700] rev 11217
Fixed bug 3723 - Possible double free in kmsdrm init code on certain errors

Simon Hug

KMSDRM_VideoInit allocates and frees some connectors and encoders but doesn't set the pointer to NULL after freeing. The cleanup code at the end may free one of those garbage pointer should an error happen in the initialization.

Thu, 10 Aug 2017 11:57:19 -0700Fixed bug 3681 - SDL_UpateTexture documentation not specific enough about format requirement
Sam Lantinga <slouken@libsdl.org> [Thu, 10 Aug 2017 11:57:19 -0700] rev 11216
Fixed bug 3681 - SDL_UpateTexture documentation not specific enough about format requirement

Simon Hug

The documentation of SDL_UpateTexture does not say that the pixel data has to be in the format of the texture.

Wed, 09 Aug 2017 20:26:16 -0700Fixed bug 3701 - WM_TOUCH message may cause calls to null if touch functions are not properly loaded
Sam Lantinga <slouken@libsdl.org> [Wed, 09 Aug 2017 20:26:16 -0700] rev 11215
Fixed bug 3701 - WM_TOUCH message may cause calls to null if touch functions are not properly loaded

Simon Hug

When WIN_WindowProc processes the WM_TOUCH message, it doesn't check if the touch functions have been properly loaded and may call a NULL pointer. It's probably an extremely rare case, but here's a patch that adds some checks anyway.

Wed, 09 Aug 2017 20:23:48 -0700Fixed bug 3728 - [Android] crash when shared libraries are no loaded
Sam Lantinga <slouken@libsdl.org> [Wed, 09 Aug 2017 20:23:48 -0700] rev 11214
Fixed bug 3728 - [Android] crash when shared libraries are no loaded

Sylvain

On Android, when shared libraries are not correctly loaded (eg SDLActivity.mBrokenLibraries is true), there is a pop-up with an error message.

After user dismisses the pop-up, application crashes:
- because the native function "nativePause()" may no be loaded (if libSDL2.so is not loaded).
- because mSurface is null.

Wed, 09 Aug 2017 20:20:35 -0700Fixed bug 3672 - Add joystick to controllerdb
Sam Lantinga <slouken@libsdl.org> [Wed, 09 Aug 2017 20:20:35 -0700] rev 11213
Fixed bug 3672 - Add joystick to controllerdb

Moritz M-H

The following entry needs to be added to the gamecontrollerdb for the Qanba fighter stick under linux

Wed, 09 Aug 2017 22:43:16 -0400cmake: Pacify warning about Policy CMP0042 not being set.
Ryan C. Gordon <icculus@icculus.org> [Wed, 09 Aug 2017 22:43:16 -0400] rev 11212
cmake: Pacify warning about Policy CMP0042 not being set.

Wed, 09 Aug 2017 22:34:45 -0400cmake: whoops, Sam and I both fixed this bug at the same time. :)
Ryan C. Gordon <icculus@icculus.org> [Wed, 09 Aug 2017 22:34:45 -0400] rev 11211
cmake: whoops, Sam and I both fixed this bug at the same time. :)