From 6217a1231b8fe2d31a97e0e66b4baa30ff558505 Mon Sep 17 00:00:00 2001 From: Andy Somogyi Date: Mon, 30 Oct 2017 20:34:34 -0400 Subject: [PATCH] clean up, remove unused includes --- examples/cocoa/AppDelegate.h | 1 + examples/cocoa/AppDelegate.m | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) 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); + } }