| 7363 | } |
| 7364 | #endif |
| 7365 | static void ThreadFunct() { |
| 7366 | #if defined(__APPLE__) |
| 7367 | static bool hasEnabledCocoa = false; |
| 7368 | if (!hasEnabledCocoa) { |
| 7369 | // Objective-C Wizardry |
| 7370 | Class NSApplicationClass = objc_getClass("NSApplication"); |
| 7371 | |
| 7372 | // NSApp = [NSApplication sharedApplication] |
| 7373 | SEL sharedApplicationSel = sel_registerName("sharedApplication"); |
| 7374 | id NSApp = ((id(*)(Class, SEL))objc_msgSend)(NSApplicationClass, sharedApplicationSel); |
| 7375 | // window = [NSApp mainWindow] |
| 7376 | SEL mainWindowSel = sel_registerName("mainWindow"); |
| 7377 | id window = ((id(*)(id, SEL))objc_msgSend)(NSApp, mainWindowSel); |
| 7378 | |
| 7379 | // [window setStyleMask: NSWindowStyleMaskClosable | ~NSWindowStyleMaskResizable] |
| 7380 | SEL setStyleMaskSel = sel_registerName("setStyleMask:"); |
| 7381 | ((void (*)(id, SEL, NSUInteger))objc_msgSend)(window, setStyleMaskSel, 7); |
| 7382 | |
| 7383 | hasEnabledCocoa = true; |
| 7384 | } |
| 7385 | #endif |
| 7386 | if (!*bActiveRef) { |
| 7387 | ExitMainLoop(); |
| 7388 | return; |
| 7389 | } |
| 7390 | glutPostRedisplay(); |
| 7391 | } |
| 7392 | |
| 7393 | static void DrawFunct() { |
| 7394 | ptrPGE->olc_CoreUpdate(); |
nothing calls this directly
no outgoing calls
no test coverage detected