diff --git a/examples/cocoa/AppDelegate.h b/examples/cocoa/AppDelegate.h index 387c77343..f3852bda0 100644 --- a/examples/cocoa/AppDelegate.h +++ b/examples/cocoa/AppDelegate.h @@ -1,4 +1,5 @@ #import // NSApplicationDelegate +#import @interface AppDelegate : NSObject diff --git a/examples/cocoa/AppDelegate.m b/examples/cocoa/AppDelegate.m index 3109594d1..59cc79ed2 100644 --- a/examples/cocoa/AppDelegate.m +++ b/examples/cocoa/AppDelegate.m @@ -31,11 +31,7 @@ #include #include #include - -#define GLFW_EXPOSE_NATIVE_COCOA -#include - -#include "linmath.h" +#include static void createCocoaGlfwWindow(int width, int height, int xpos, int ypos); static void cocoaGlfwStep(); @@ -237,6 +233,8 @@ static void cocoaGlfwCloseWindow() { } static void cocoaGlfwStep() { - angle += 0.1; - window_refresh_callback(win); + if(win) { + angle += 0.1; + window_refresh_callback(win); + } }