commit | 09086aefaa4e74407d95c7886d3182778118b68f | [log] [tgz] |
---|---|---|
author | Daniel Brookman <dannntrax@gmail.com> | Mon May 02 15:22:46 2022 -0400 |
committer | Ozkan Sezer <sezeroz@gmail.com> | Thu May 19 22:00:28 2022 +0300 |
tree | 22320532377923f57540210a6c9454210ebad4f5 | |
parent | f8e14ad25aa6f0b4bbed411583a9863c855ad9e6 [diff] |
Fix crash when reading background events for MFi controllers on macOS Enabling GCController.shouldMonitorBackgroundEvents to read background events for MFi controllers before receiving the first GCControllerDidConnectNotification is apparently a no-go on macOS (12.3.1 for me), and would crash on attempt. Apple's documentation is... not great, and doesn't point this out. This waits for IOS_AddMFIJoystickDevice() to get called down the chain from GCControllerDidConnectNotification, and enables GCController.shouldMonitorBackgroundEvents if it hadn't been already. On iOS and tvOS, GCController.shouldMonitorBackgroundEvents is ignored, so there's no need to check their versions. (cherry picked from commit d1a3981bf866ccf8e802253ee7a150667c1dfc15)
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.
More extensive documentation is available in the docs directory, starting with README.md
Enjoy!
Sam Lantinga (slouken@libsdl.org)