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.5.0~54 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=259fc435ccf56dcd2d715d7cc6615163434b8dc4;hp=aeeac26bd3a4e17e0d827e7dac9587493c93cb62;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 ::stable-branch::merge=f5e83d62d46ade080beb825e4430f69be4859460 --- 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