From a5e4b5e7f839dbb5f363166768911bf57711989c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 16 Jul 2013 23:17:55 +0200 Subject: [PATCH] (APPLE) Take out SDL/GL context parts for OSX --- gfx/context/sdl_ctx.c | 19 ------------------- gfx/sdl_gfx.c | 2 -- 2 files changed, 21 deletions(-) diff --git a/gfx/context/sdl_ctx.c b/gfx/context/sdl_ctx.c index 4deac696db..116a42e8a9 100644 --- a/gfx/context/sdl_ctx.c +++ b/gfx/context/sdl_ctx.c @@ -21,13 +21,7 @@ #include "x11_common.h" #endif -#ifdef __APPLE__ -#include -#include -#else #include "SDL/SDL_syswm.h" -#endif - #include "SDL.h" #include "../math/matrix.h" @@ -61,9 +55,6 @@ static void gfx_ctx_swap_interval(unsigned interval) GL_SYM_WRAP(wgl_swap_interval, "wglSwapIntervalEXT"); if (wgl_swap_interval) success = wgl_swap_interval(g_interval); -#elif defined(__APPLE__) && defined(HAVE_OPENGL) - GLint val = g_interval; - success = CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &val) == 0; #else static int (*glx_swap_interval)(int) = NULL; if (!glx_swap_interval) @@ -150,11 +141,7 @@ static bool gfx_ctx_set_video_mode( unsigned width, unsigned height, bool fullscreen) { -#ifndef __APPLE__ // Resizing on OSX is broken in 1.2 it seems :) static const int resizable = SDL_RESIZABLE; -#else - static const int resizable = 0; -#endif SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, g_interval); @@ -195,13 +182,7 @@ static bool gfx_ctx_set_video_mode( // SDL 1.2 has an awkward model where you need to "confirm" window resizing. static void gfx_ctx_set_resize(unsigned width, unsigned height) { -#ifndef __APPLE__ // Resizing on OSX is broken in 1.2 it seems :) SDL_SetVideoMode(width, height, 0, SDL_OPENGL | (g_fullscreen ? SDL_FULLSCREEN : SDL_RESIZABLE)); -#else - // Resize on OSX is broken. - (void)width; - (void)height; -#endif } static void gfx_ctx_swap_buffers(void) diff --git a/gfx/sdl_gfx.c b/gfx/sdl_gfx.c index b3c8c97ebf..d9084c296b 100644 --- a/gfx/sdl_gfx.c +++ b/gfx/sdl_gfx.c @@ -31,9 +31,7 @@ #include "config.h" #endif -#ifndef __APPLE__ // Broken on OSX. #include "SDL/SDL_syswm.h" -#endif typedef struct sdl_video {