Various fixes from Fuma

This commit is contained in:
Tim Angus 2013-09-15 23:54:52 +01:00
parent fb9270306b
commit 58b8cfa0b3
2 changed files with 4 additions and 10 deletions

View File

@ -46,7 +46,7 @@ typedef enum
} rserr_t;
SDL_Window *SDL_window = NULL;
static SDL_GLContext *SDL_glContext = NULL;
static SDL_GLContext SDL_glContext = NULL;
cvar_t *r_allowSoftwareGL; // Don't abort out if a hardware visual can't be obtained
cvar_t *r_allowResize; // make window resizable
@ -102,8 +102,8 @@ GLimp_CompareModes
static int GLimp_CompareModes( const void *a, const void *b )
{
const float ASPECT_EPSILON = 0.001f;
SDL_Rect *modeA = (SDL_Rect *)&a;
SDL_Rect *modeB = (SDL_Rect *)&b;
SDL_Rect *modeA = (SDL_Rect *)a;
SDL_Rect *modeB = (SDL_Rect *)b;
float aspectA = (float)modeA->w / (float)modeA->h;
float aspectB = (float)modeB->w / (float)modeB->h;
int areaA = modeA->w * modeA->h;
@ -448,12 +448,6 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
continue;
}
if( SDL_GL_MakeCurrent( SDL_window, SDL_glContext ) < 0 )
{
ri.Printf( PRINT_DEVELOPER, "SDL_GL_MakeCurrent failed: %s\n", SDL_GetError( ) );
continue;
}
SDL_GL_SetSwapInterval( r_swapInterval->integer );
glConfig.colorBits = testColorBits;

View File

@ -590,7 +590,7 @@ int main( int argc, char **argv )
// Run time
SDL_version ver;
SDL_VERSION( &ver );
SDL_GetVersion( &ver );
#define MINSDL_VERSION \
XSTRING(MINSDL_MAJOR) "." \