Fri, 06 Dec 2019 13:48:10 -0800Fixed the game controller menu button on tvOS 13.2 (thanks Romain Tisserand)
Sam Lantinga [Fri, 06 Dec 2019 13:48:10 -0800] rev 13318
Fixed the game controller menu button on tvOS 13.2 (thanks Romain Tisserand)

Thu, 05 Dec 2019 17:27:06 -0500cocoa: Patched to compile on older compilers.
Ryan C. Gordon [Thu, 05 Dec 2019 17:27:06 -0500] rev 13317
cocoa: Patched to compile on older compilers.

Thu, 05 Dec 2019 13:48:08 -0800Fixed controller mapping issues caused by PS3 gyro jitter
Sam Lantinga [Thu, 05 Dec 2019 13:48:08 -0800] rev 13316
Fixed controller mapping issues caused by PS3 gyro jitter

Thu, 05 Dec 2019 13:18:56 -0800Ignore axis jitter when mapping controllers
Sam Lantinga [Thu, 05 Dec 2019 13:18:56 -0800] rev 13315
Ignore axis jitter when mapping controllers

Thu, 05 Dec 2019 13:18:53 -0800Get full axis range for PS3 controller triggers on Linux
Sam Lantinga [Thu, 05 Dec 2019 13:18:53 -0800] rev 13314
Get full axis range for PS3 controller triggers on Linux

Wed, 04 Dec 2019 12:20:24 -0500cocoa: SDL_GetDisplayDPI() should account for Retina displays.
Ryan C. Gordon [Wed, 04 Dec 2019 12:20:24 -0500] rev 13313
cocoa: SDL_GetDisplayDPI() should account for Retina displays.

Fixes Bugzilla #4856.

Tue, 03 Dec 2019 22:07:58 -0800Fixed bug 4882 - Fix build for iOS when disabling OpenGL
Sam Lantinga [Tue, 03 Dec 2019 22:07:58 -0800] rev 13312
Fixed bug 4882 - Fix build for iOS when disabling OpenGL

Aaron Barany

Since OpenGL is deprecated on iOS, it is advantageous to be able to remove all OpenGL related code when building SDL for iOS. This patch adds the necessary #if checks to compile in this case.

Mon, 02 Dec 2019 15:41:25 +0000Fix sending SDL_WINDOWEVENT_RESTORED after unminimizing windows on X11
Alex Smith [Mon, 02 Dec 2019 15:41:25 +0000] rev 13311
Fix sending SDL_WINDOWEVENT_RESTORED after unminimizing windows on X11

SDL_SendWindowEvent will only send a RESTORED event if the window has
the minimized or maximized flag set. However, for a SHOWN event, it
will clear the minimized flag. Since the SHOWN event was being sent
first for a MapNotify event, the RESTORED event would never be sent.
Swapping the SendWindowEvent calls around fixes this.

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

Wed, 20 Nov 2019 20:27:45 -0800Use stat() to minimize input device opens when not using udev
Cameron Gutman [Wed, 20 Nov 2019 20:27:45 -0800] rev 13310
Use stat() to minimize input device opens when not using udev

Calling open() on input devices can generate device I/O which blocks
the main thread and causes dropped frames. Using stat() we can avoid
opening anything unless /dev/input has changed since we last polled.

We could have used something fancy like inotify, but it didn't seem
worth the added complexity for this uncommon non-udev case.

Tue, 03 Dec 2019 07:12:55 -0800Fixed bug 4877 - Add support for loading menus from a nib/xib instead of building a hardcoded minimum set
Sam Lantinga [Tue, 03 Dec 2019 07:12:55 -0800] rev 13309
Fixed bug 4877 - Add support for loading menus from a nib/xib instead of building a hardcoded minimum set

Eric Shepherd

Currently, SDL on Cocoa macOS creates a rudimentary menu bar programmatically if none is already present when the app is registered during setup.

SDL could be much more easily and flexibly used on macOS if upon finding that no menus are currently in place, it first looked for the application's main menu nib or xib file and, if found, loaded that instead of programmatically building the menus.

This would then let developers simply drop in a nib file with a menu bar defined in it and it would be installed and used automatically.

Attached is a patch that does just this. It changes the SDL_cocoaevents.m file to:

* In Cocoa_RegisterApp(), before calling CreateApplicationMenus(), it calls a new function, LoadMainMenuNibIfAvailable(), which attempts to load and install the main menu nib file, using the nib name fetched from the Info.plist file. If that succeeds, LoadMainMenuNibIfAvailable() returns true; otherwise false.
* If LMMNIA() returns false, CreateApplicationMenus() is called to programmatically build the menus as before.
* Otherwise, we're done, and using the menus from the nib/xib file!

I made these changes to support a project I'm working on, and felt they were useful enough to be worth offering them for uplift. They should have zero impact on existing projects' behavior, but make Cocoa SDL development miles easier.