Wed, 21 Feb 2018 21:36:10 -0500windows: added WIN_IsWindows7OrGreater().
Ryan C. Gordon <icculus@icculus.org> [Wed, 21 Feb 2018 21:36:10 -0500] rev 11888
windows: added WIN_IsWindows7OrGreater().

Wed, 21 Feb 2018 12:42:30 -0500Use new XInput mapping for Win10+ (Bugzilla #3960)
Ethan Lee <flibitijibibo@flibitijibibo.com> [Wed, 21 Feb 2018 12:42:30 -0500] rev 11887
Use new XInput mapping for Win10+ (Bugzilla #3960)

Wed, 21 Feb 2018 09:58:21 -0800Fix high-dpi support on macOS and simplify it and iOS variant.
Mark Callow <libsdl.org@callow.im> [Wed, 21 Feb 2018 09:58:21 -0800] rev 11886
Fix high-dpi support on macOS and simplify it and iOS variant.

The detault drawableSize for a CAMetalLayer is its bounds x its scale.
So it is sufficient to set the *layer's* scale to the desired value.

Wed, 21 Feb 2018 09:40:47 -0800Fixed bug 4034 - Don't include _DllMainCRTStartup() if SDL_STATIC_LIB is defined.
Sam Lantinga <slouken@libsdl.org> [Wed, 21 Feb 2018 09:40:47 -0800] rev 11885
Fixed bug 4034 - Don't include _DllMainCRTStartup() if SDL_STATIC_LIB is defined.

Tue, 20 Feb 2018 09:04:31 -0800Fixed bug 4088 - Fix Metal link errors with test programs in SDLTest.xcodeproj
Sam Lantinga <slouken@libsdl.org> [Tue, 20 Feb 2018 09:04:31 -0800] rev 11884
Fixed bug 4088 - Fix Metal link errors with test programs in SDLTest.xcodeproj

Eric Wasylishen

The following patch adds Metal.framework to the "link binary with libraries" section of each test program, with "status" set to "optional", which fixes link errors on all of the test programs. I'm not sure if this is a correct fix - the fact that this was necessary might indicate the static SDL2.a library has a hard dependency on Metal.framework (?) - but it gets the test programs working in Xcode again.

It also adds testyuv_cvt.c to the testoverlay2 target, fixing a link error.

Sun, 18 Feb 2018 09:09:56 -0800Actually, this is needed for building with Visual Studio with both /MT and /MD.
Sam Lantinga <slouken@libsdl.org> [Sun, 18 Feb 2018 09:09:56 -0800] rev 11883
Actually, this is needed for building with Visual Studio with both /MT and /MD.
With the previous change, I get:
1> Creating library C:\projects\SDL\VisualC\Win32\Debug\SDL2.lib and object C:\projects\SDL\VisualC\Win32\Debug\SDL2.exp
1>LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12

Sun, 18 Feb 2018 08:57:01 -0800Fixed bug 4034 - Do we really need _DllMainCRTStartup() in every Windows build?
Sam Lantinga <slouken@libsdl.org> [Sun, 18 Feb 2018 08:57:01 -0800] rev 11882
Fixed bug 4034 - Do we really need _DllMainCRTStartup() in every Windows build?

Andreas Falkenhahn

In src/SDL.c there is this code:

_DllMainCRTStartup(HANDLE hModule,

...

The comment says that this is needed on Watcom C for some reason but why is it included then when building with Visual C as well? Shouldn't it be only included when compiling on Watcom C then?

I'm asking because this code caused me a lot of headaches because I'm building a DLL that contains SDL and I link using /MT and the _DllMainCRTStartup() symbol obviously led to lots of trouble but it wasn't clear to me where the problem was because all I got from the linker was:

LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup

So I had to got through each and every object to see what the culprit was. See here for the full story:
https://stackoverflow.com/questions/25067151/lnk2019-unresolved-external-symbol-main-referenced-in-function-tmaincrtstar/48177067#48177067

So if it isn't necessary on Visual C, please just leave that symbol out on Visual C so that it no longer leads to any trouble. Thanks.

Sat, 17 Feb 2018 23:57:57 -0500pthread: fix error code checks (thanks, Andreas!).
Ryan C. Gordon <icculus@icculus.org> [Sat, 17 Feb 2018 23:57:57 -0500] rev 11881
pthread: fix error code checks (thanks, Andreas!).

Most pthread functions return 0 on success and non-zero on error, but those
errors might be positive or negative, so checking for return values in the
Unix style, where errors are less than zero, is a bug.

Fixes Bugzilla #4039.

Sat, 17 Feb 2018 20:18:48 -0500yuv: patched to compile.
Ryan C. Gordon <icculus@icculus.org> [Sat, 17 Feb 2018 20:18:48 -0500] rev 11880
yuv: patched to compile.

Sat, 17 Feb 2018 20:10:13 -0500yuv: fixed variable declaration shadowing warnings.
Ryan C. Gordon <icculus@icculus.org> [Sat, 17 Feb 2018 20:10:13 -0500] rev 11879
yuv: fixed variable declaration shadowing warnings.

Fixes Bugzilla #4062.