···6363 SDL_VideoDevice *device;
6464 SDL_CocoaVideoData *data;
65656666+ if (![NSThread isMainThread]) {
6767+ return NULL; // this doesn't SDL_SetError() because SDL_VideoInit is just going to overwrite it.
6868+ }
6969+6670 Cocoa_RegisterApp();
67716872 // Initialize all variables that we clean on shutdown