From: havoc Date: Fri, 5 Aug 2011 16:52:37 +0000 (+0000) Subject: fix a couple compile issues affecting Maemo X-Git-Tag: xonotic-v0.6.0~163^2~285 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f5e83d62d46ade080beb825e4430f69be4859460;p=xonotic%2Fdarkplaces.git fix a couple compile issues affecting Maemo git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11267 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_sdl.c b/vid_sdl.c index 941b5c5f..9af5f2c3 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -66,18 +66,18 @@ int cl_available = true; qboolean vid_supportrefreshrate = false; -#ifdef USE_GLES2 -# define SETVIDEOMODE 0 +#if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION == 2 +# define SETVIDEOMODE 1 #else -# if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION == 2 -# define SETVIDEOMODE 1 +# ifdef USE_GLES2 +# define SETVIDEOMODE 0 # else // LordHavoc: SDL 1.3's SDL_CreateWindow API is not finished enough to use yet, but you can set this to 0 if you want to try it... -# ifndef SETVIDEOMODE -# define SETVIDEOMODE 1 +# ifndef SETVIDEOMODE +# define SETVIDEOMODE 1 +# endif # endif # endif -#endif static qboolean vid_usingmouse = false; static qboolean vid_usinghidecursor = false; @@ -1305,6 +1305,10 @@ void wrapglGetVertexAttribiv(GLuint index, GLenum pname, GLint *params) {PRECALL void wrapglGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid **pointer) {PRECALL;glGetVertexAttribPointerv(index, pname, pointer);POSTCALL;} #endif +#if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION == 2 +#define SDL_GL_ExtensionSupported(x) (strstr(gl_extensions, x) || strstr(gl_platformextensions, x)) +#endif + void GLES_Init(void) { #ifndef qglClear