mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 15:21:35 +00:00
Various fixes from Fuma
This commit is contained in:
parent
fb9270306b
commit
58b8cfa0b3
2 changed files with 4 additions and 10 deletions
|
@ -46,7 +46,7 @@ typedef enum
|
||||||
} rserr_t;
|
} rserr_t;
|
||||||
|
|
||||||
SDL_Window *SDL_window = NULL;
|
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_allowSoftwareGL; // Don't abort out if a hardware visual can't be obtained
|
||||||
cvar_t *r_allowResize; // make window resizable
|
cvar_t *r_allowResize; // make window resizable
|
||||||
|
@ -102,8 +102,8 @@ GLimp_CompareModes
|
||||||
static int GLimp_CompareModes( const void *a, const void *b )
|
static int GLimp_CompareModes( const void *a, const void *b )
|
||||||
{
|
{
|
||||||
const float ASPECT_EPSILON = 0.001f;
|
const float ASPECT_EPSILON = 0.001f;
|
||||||
SDL_Rect *modeA = (SDL_Rect *)&a;
|
SDL_Rect *modeA = (SDL_Rect *)a;
|
||||||
SDL_Rect *modeB = (SDL_Rect *)&b;
|
SDL_Rect *modeB = (SDL_Rect *)b;
|
||||||
float aspectA = (float)modeA->w / (float)modeA->h;
|
float aspectA = (float)modeA->w / (float)modeA->h;
|
||||||
float aspectB = (float)modeB->w / (float)modeB->h;
|
float aspectB = (float)modeB->w / (float)modeB->h;
|
||||||
int areaA = modeA->w * modeA->h;
|
int areaA = modeA->w * modeA->h;
|
||||||
|
@ -448,12 +448,6 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
|
||||||
continue;
|
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 );
|
SDL_GL_SetSwapInterval( r_swapInterval->integer );
|
||||||
|
|
||||||
glConfig.colorBits = testColorBits;
|
glConfig.colorBits = testColorBits;
|
||||||
|
|
|
@ -590,7 +590,7 @@ int main( int argc, char **argv )
|
||||||
|
|
||||||
// Run time
|
// Run time
|
||||||
SDL_version ver;
|
SDL_version ver;
|
||||||
SDL_VERSION( &ver );
|
SDL_GetVersion( &ver );
|
||||||
|
|
||||||
#define MINSDL_VERSION \
|
#define MINSDL_VERSION \
|
||||||
XSTRING(MINSDL_MAJOR) "." \
|
XSTRING(MINSDL_MAJOR) "." \
|
||||||
|
|
Loading…
Reference in a new issue