Simple Directmedia Layer

cocoa: Refuse to SDL_Init(SDL_INIT_VIDEO) from background thread.

Fixes #11437.
Reference PR #11502.

+4
+4
src/video/cocoa/SDL_cocoavideo.m
··· 63 63 SDL_VideoDevice *device; 64 64 SDL_CocoaVideoData *data; 65 65 66 + if (![NSThread isMainThread]) { 67 + return NULL; // this doesn't SDL_SetError() because SDL_VideoInit is just going to overwrite it. 68 + } 69 + 66 70 Cocoa_RegisterApp(); 67 71 68 72 // Initialize all variables that we clean on shutdown