From bc8b348a0452365d5cd6ad5748c2343193495c8c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 9 Feb 2019 04:45:37 +0100 Subject: [PATCH] (Cocoa) Cut down on some ifdefs --- ui/drivers/cocoa/ui_cocoa_window.m | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/ui/drivers/cocoa/ui_cocoa_window.m b/ui/drivers/cocoa/ui_cocoa_window.m index 83db6dcaaebc..ac5406b03951 100644 --- a/ui/drivers/cocoa/ui_cocoa_window.m +++ b/ui/drivers/cocoa/ui_cocoa_window.m @@ -42,11 +42,7 @@ static void ui_window_cocoa_destroy(void *data) static void ui_window_cocoa_set_focused(void *data) { ui_window_cocoa_t *cocoa = (ui_window_cocoa_t*)data; -#if defined(HAVE_COCOA_METAL) CocoaView *cocoa_view = (BRIDGE CocoaView*)cocoa->data; -#elif defined(HAVE_COCOA) - CocoaView *cocoa_view = (CocoaView*)cocoa->data; -#endif [[cocoa_view window] makeKeyAndOrderFront:nil]; } @@ -54,11 +50,7 @@ static void ui_window_cocoa_set_visible(void *data, bool set_visible) { ui_window_cocoa_t *cocoa = (ui_window_cocoa_t*)data; -#if defined(HAVE_COCOA_METAL) CocoaView *cocoa_view = (BRIDGE CocoaView*)cocoa->data; -#elif defined(HAVE_COCOA) - CocoaView *cocoa_view = (CocoaView*)cocoa->data; -#endif if (set_visible) [[cocoa_view window] makeKeyAndOrderFront:nil]; else @@ -68,11 +60,7 @@ static void ui_window_cocoa_set_visible(void *data, static void ui_window_cocoa_set_title(void *data, char *buf) { ui_window_cocoa_t *cocoa = (ui_window_cocoa_t*)data; -#if defined(HAVE_COCOA_METAL) CocoaView *cocoa_view = (BRIDGE CocoaView*)cocoa->data; -#else - CocoaView *cocoa_view = (CocoaView*)cocoa->data; -#endif const char* const text = buf; /* < Can't access buffer directly in the block */ [[cocoa_view window] setTitle:[NSString stringWithCString:text encoding:NSUTF8StringEncoding]]; } @@ -80,11 +68,7 @@ static void ui_window_cocoa_set_title(void *data, char *buf) static void ui_window_cocoa_set_droppable(void *data, bool droppable) { ui_window_cocoa_t *cocoa = (ui_window_cocoa_t*)data; -#if defined(HAVE_COCOA_METAL) CocoaView *cocoa_view = (BRIDGE CocoaView*)cocoa->data; -#else - CocoaView *cocoa_view = (CocoaView*)cocoa->data; -#endif if (droppable) { @@ -103,11 +87,7 @@ static void ui_window_cocoa_set_droppable(void *data, bool droppable) static bool ui_window_cocoa_focused(void *data) { ui_window_cocoa_t *cocoa = (ui_window_cocoa_t*)data; -#if defined(HAVE_COCOA_METAL) CocoaView *cocoa_view = (BRIDGE CocoaView*)cocoa->data; -#else - CocoaView *cocoa_view = (CocoaView*)cocoa->data; -#endif return cocoa_view.window.isMainWindow; }