diff --git a/gfx/gl.c b/gfx/gl.c index 2874eef569..004086af01 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -32,10 +32,12 @@ #include "sdlwrap.h" #include "../compat/strl.h" +#ifdef HAVE_SDL #define NO_SDL_GLEXT #include "SDL.h" #include "SDL_opengl.h" #include "../input/rarch_sdl_input.h" +#endif #ifdef HAVE_CG #include "shader_cg.h" @@ -81,7 +83,9 @@ static const GLfloat white_color[] = { 1, 1, 1, 1, }; +#ifdef HAVE_SDL #define LOAD_SYM(sym) if (!p##sym) { SDL_SYM_WRAP(p##sym, #sym) } +#endif #ifdef HAVE_FBO #ifdef _WIN32 diff --git a/gfx/sdlwrap.h b/gfx/sdlwrap.h index 591f487561..c23f399c04 100644 --- a/gfx/sdlwrap.h +++ b/gfx/sdlwrap.h @@ -24,6 +24,8 @@ #include "../boolean.h" #include "../driver.h" + +#ifdef HAVE_SDL #include "SDL.h" #include "SDL_version.h" #include "SDL_syswm.h" @@ -40,6 +42,7 @@ void *sym__ = SDL_GL_GetProcAddress(symbol); \ memcpy(&(sym), &sym__, sizeof(void*)); \ } +#endif void sdlwrap_set_swap_interval(unsigned interval, bool inited);