Add the Cocoa notification driver

Supported on macOS 10.14+ and iOS.
This commit is contained in:
Frank Praznik
2026-04-06 12:46:29 -04:00
parent 984b03680f
commit ba7c0b897b
5 changed files with 420 additions and 0 deletions

View File

@@ -359,6 +359,11 @@ bool SDL_InitSubSystem(SDL_InitFlags flags)
SDL_DBus_Init();
#endif
#ifdef SDL_PLATFORM_APPLE
// Apple platforms require the notification delegate to be registered early.
Cocoa_RegisterNotificationDelegate();
#endif
#ifdef SDL_PLATFORM_WINDOWS
if (flags & (SDL_INIT_HAPTIC | SDL_INIT_JOYSTICK)) {
if (!SDL_HelperWindowCreate()) {