2007-09-05 18:17:46 +00:00
|
|
|
/*
|
|
|
|
===========================================================================
|
|
|
|
Copyright (C) 1999-2005 Id Software, Inc.
|
|
|
|
|
|
|
|
This file is part of Quake III Arena source code.
|
|
|
|
|
|
|
|
Quake III Arena source code is free software; you can redistribute it
|
|
|
|
and/or modify it under the terms of the GNU General Public License as
|
|
|
|
published by the Free Software Foundation; either version 2 of the License,
|
|
|
|
or (at your option) any later version.
|
|
|
|
|
|
|
|
Quake III Arena source code is distributed in the hope that it will be
|
|
|
|
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Quake III Arena source code; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
===========================================================================
|
|
|
|
*/
|
|
|
|
|
2007-11-02 23:36:23 +00:00
|
|
|
#ifdef USE_LOCAL_HEADERS
|
|
|
|
# include "SDL.h"
|
|
|
|
#else
|
|
|
|
# include <SDL.h>
|
|
|
|
#endif
|
2007-09-05 18:17:46 +00:00
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2007-12-11 00:19:23 +00:00
|
|
|
#include <math.h>
|
2007-09-05 18:17:46 +00:00
|
|
|
|
2013-02-16 20:58:04 +00:00
|
|
|
#include "../renderercommon/tr_common.h"
|
2007-09-05 18:17:46 +00:00
|
|
|
#include "../sys/sys_local.h"
|
|
|
|
#include "sdl_icon.h"
|
|
|
|
|
|
|
|
/* Just hack it for now. */
|
|
|
|
#ifdef MACOS_X
|
2007-09-06 02:16:07 +00:00
|
|
|
#include <OpenGL/OpenGL.h>
|
2007-09-05 18:17:46 +00:00
|
|
|
typedef CGLContextObj QGLContext;
|
|
|
|
#define GLimp_GetCurrentContext() CGLGetCurrentContext()
|
|
|
|
#define GLimp_SetCurrentContext(ctx) CGLSetCurrentContext(ctx)
|
|
|
|
#else
|
|
|
|
typedef void *QGLContext;
|
|
|
|
#define GLimp_GetCurrentContext() (NULL)
|
|
|
|
#define GLimp_SetCurrentContext(ctx)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static QGLContext opengl_context;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
RSERR_OK,
|
|
|
|
|
|
|
|
RSERR_INVALID_FULLSCREEN,
|
|
|
|
RSERR_INVALID_MODE,
|
|
|
|
|
|
|
|
RSERR_UNKNOWN
|
|
|
|
} rserr_t;
|
|
|
|
|
|
|
|
static SDL_Surface *screen = NULL;
|
2008-08-13 19:39:38 +00:00
|
|
|
static const SDL_VideoInfo *videoInfo = NULL;
|
2007-09-05 18:17:46 +00:00
|
|
|
|
|
|
|
cvar_t *r_allowSoftwareGL; // Don't abort out if a hardware visual can't be obtained
|
2009-09-14 22:07:34 +00:00
|
|
|
cvar_t *r_allowResize; // make window resizable
|
2009-11-06 15:34:05 +00:00
|
|
|
cvar_t *r_centerWindow;
|
2008-08-09 13:20:00 +00:00
|
|
|
cvar_t *r_sdlDriver;
|
2007-09-05 18:17:46 +00:00
|
|
|
|
2007-09-12 18:02:38 +00:00
|
|
|
void (APIENTRYP qglActiveTextureARB) (GLenum texture);
|
|
|
|
void (APIENTRYP qglClientActiveTextureARB) (GLenum texture);
|
|
|
|
void (APIENTRYP qglMultiTexCoord2fARB) (GLenum target, GLfloat s, GLfloat t);
|
|
|
|
|
|
|
|
void (APIENTRYP qglLockArraysEXT) (GLint first, GLsizei count);
|
|
|
|
void (APIENTRYP qglUnlockArraysEXT) (void);
|
2007-09-05 18:17:46 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
GLimp_Shutdown
|
|
|
|
===============
|
|
|
|
*/
|
|
|
|
void GLimp_Shutdown( void )
|
|
|
|
{
|
2011-08-01 01:19:55 +00:00
|
|
|
ri.IN_Shutdown();
|
2007-09-05 18:17:46 +00:00
|
|
|
|
|
|
|
SDL_QuitSubSystem( SDL_INIT_VIDEO );
|
|
|
|
screen = NULL;
|
|
|
|
}
|
|
|
|
|
2011-02-10 19:21:13 +00:00
|
|
|
/*
|
|
|
|
===============
|
|
|
|
GLimp_Minimize
|
|
|
|
|
|
|
|
Minimize the game so that user is back at the desktop
|
|
|
|
===============
|
|
|
|
*/
|
|
|
|
void GLimp_Minimize(void)
|
|
|
|
{
|
|
|
|
SDL_WM_IconifyWindow();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
/*
|
|
|
|
===============
|
|
|
|
GLimp_LogComment
|
|
|
|
===============
|
|
|
|
*/
|
|
|
|
void GLimp_LogComment( char *comment )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2007-12-11 00:19:23 +00:00
|
|
|
/*
|
|
|
|
===============
|
|
|
|
GLimp_CompareModes
|
|
|
|
===============
|
|
|
|
*/
|
|
|
|
static int GLimp_CompareModes( const void *a, const void *b )
|
2007-12-08 10:08:05 +00:00
|
|
|
{
|
2007-12-11 00:19:23 +00:00
|
|
|
const float ASPECT_EPSILON = 0.001f;
|
|
|
|
SDL_Rect *modeA = *(SDL_Rect **)a;
|
|
|
|
SDL_Rect *modeB = *(SDL_Rect **)b;
|
2009-11-05 20:29:26 +00:00
|
|
|
float aspectA = (float)modeA->w / (float)modeA->h;
|
|
|
|
float aspectB = (float)modeB->w / (float)modeB->h;
|
|
|
|
int areaA = modeA->w * modeA->h;
|
|
|
|
int areaB = modeB->w * modeB->h;
|
|
|
|
float aspectDiffA = fabs( aspectA - displayAspect );
|
|
|
|
float aspectDiffB = fabs( aspectB - displayAspect );
|
2007-12-11 00:19:23 +00:00
|
|
|
float aspectDiffsDiff = aspectDiffA - aspectDiffB;
|
|
|
|
|
|
|
|
if( aspectDiffsDiff > ASPECT_EPSILON )
|
|
|
|
return 1;
|
|
|
|
else if( aspectDiffsDiff < -ASPECT_EPSILON )
|
|
|
|
return -1;
|
|
|
|
else
|
2009-11-05 20:29:26 +00:00
|
|
|
return areaA - areaB;
|
2007-12-11 00:19:23 +00:00
|
|
|
}
|
|
|
|
|
2009-11-05 20:29:26 +00:00
|
|
|
|
2007-12-11 00:19:23 +00:00
|
|
|
/*
|
|
|
|
===============
|
|
|
|
GLimp_DetectAvailableModes
|
|
|
|
===============
|
|
|
|
*/
|
|
|
|
static void GLimp_DetectAvailableModes(void)
|
|
|
|
{
|
|
|
|
char buf[ MAX_STRING_CHARS ] = { 0 };
|
|
|
|
SDL_Rect **modes;
|
|
|
|
int numModes;
|
|
|
|
int i;
|
|
|
|
|
2009-10-25 22:36:32 +00:00
|
|
|
modes = SDL_ListModes( videoInfo->vfmt, SDL_OPENGL | SDL_FULLSCREEN );
|
2007-12-11 00:19:23 +00:00
|
|
|
|
|
|
|
if( !modes )
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_WARNING, "Can't get list of available modes\n" );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( modes == (SDL_Rect **)-1 )
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "Display supports any resolution\n" );
|
|
|
|
return; // can set any resolution
|
|
|
|
}
|
|
|
|
|
|
|
|
for( numModes = 0; modes[ numModes ]; numModes++ );
|
|
|
|
|
2009-11-05 20:29:26 +00:00
|
|
|
if( numModes > 1 )
|
|
|
|
qsort( modes, numModes, sizeof( SDL_Rect* ), GLimp_CompareModes );
|
2007-12-11 00:19:23 +00:00
|
|
|
|
|
|
|
for( i = 0; i < numModes; i++ )
|
|
|
|
{
|
|
|
|
const char *newModeString = va( "%ux%u ", modes[ i ]->w, modes[ i ]->h );
|
|
|
|
|
|
|
|
if( strlen( newModeString ) < (int)sizeof( buf ) - strlen( buf ) )
|
|
|
|
Q_strcat( buf, sizeof( buf ), newModeString );
|
|
|
|
else
|
|
|
|
ri.Printf( PRINT_WARNING, "Skipping mode %ux%x, buffer too small\n", modes[i]->w, modes[i]->h );
|
|
|
|
}
|
|
|
|
|
|
|
|
if( *buf )
|
|
|
|
{
|
|
|
|
buf[ strlen( buf ) - 1 ] = 0;
|
|
|
|
ri.Printf( PRINT_ALL, "Available modes: '%s'\n", buf );
|
|
|
|
ri.Cvar_Set( "r_availableModes", buf );
|
|
|
|
}
|
2007-12-08 10:08:05 +00:00
|
|
|
}
|
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
/*
|
|
|
|
===============
|
|
|
|
GLimp_SetMode
|
|
|
|
===============
|
|
|
|
*/
|
2009-11-03 20:29:43 +00:00
|
|
|
static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
|
2007-09-05 18:17:46 +00:00
|
|
|
{
|
|
|
|
const char* glstring;
|
|
|
|
int sdlcolorbits;
|
|
|
|
int colorbits, depthbits, stencilbits;
|
|
|
|
int tcolorbits, tdepthbits, tstencilbits;
|
2009-06-13 22:00:28 +00:00
|
|
|
int samples;
|
2007-09-05 18:17:46 +00:00
|
|
|
int i = 0;
|
|
|
|
SDL_Surface *vidscreen = NULL;
|
2007-10-01 07:56:32 +00:00
|
|
|
Uint32 flags = SDL_OPENGL;
|
2007-09-05 18:17:46 +00:00
|
|
|
|
|
|
|
ri.Printf( PRINT_ALL, "Initializing OpenGL display\n");
|
|
|
|
|
2009-09-14 22:07:34 +00:00
|
|
|
if ( r_allowResize->integer )
|
|
|
|
flags |= SDL_RESIZABLE;
|
|
|
|
|
2008-08-13 19:39:38 +00:00
|
|
|
if( videoInfo == NULL )
|
|
|
|
{
|
|
|
|
static SDL_VideoInfo sVideoInfo;
|
|
|
|
static SDL_PixelFormat sPixelFormat;
|
|
|
|
|
|
|
|
videoInfo = SDL_GetVideoInfo( );
|
|
|
|
|
|
|
|
// Take a copy of the videoInfo
|
|
|
|
Com_Memcpy( &sPixelFormat, videoInfo->vfmt, sizeof( SDL_PixelFormat ) );
|
|
|
|
sPixelFormat.palette = NULL; // Should already be the case
|
|
|
|
Com_Memcpy( &sVideoInfo, videoInfo, sizeof( SDL_VideoInfo ) );
|
|
|
|
sVideoInfo.vfmt = &sPixelFormat;
|
|
|
|
videoInfo = &sVideoInfo;
|
|
|
|
|
2009-09-28 11:57:16 +00:00
|
|
|
if( videoInfo->current_h > 0 )
|
|
|
|
{
|
|
|
|
// Guess the display aspect ratio through the desktop resolution
|
|
|
|
// by assuming (relatively safely) that it is set at or close to
|
|
|
|
// the display's native aspect ratio
|
|
|
|
displayAspect = (float)videoInfo->current_w / (float)videoInfo->current_h;
|
|
|
|
|
|
|
|
ri.Printf( PRINT_ALL, "Estimated display aspect: %.3f\n", displayAspect );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL,
|
2009-09-28 12:44:43 +00:00
|
|
|
"Cannot estimate display aspect, assuming 1.333\n" );
|
2009-09-28 11:57:16 +00:00
|
|
|
}
|
2007-12-11 00:19:23 +00:00
|
|
|
}
|
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
ri.Printf (PRINT_ALL, "...setting mode %d:", mode );
|
|
|
|
|
2012-08-27 14:52:41 +00:00
|
|
|
if (mode == -2)
|
|
|
|
{
|
|
|
|
// use desktop video resolution
|
|
|
|
if( videoInfo->current_h > 0 )
|
|
|
|
{
|
|
|
|
glConfig.vidWidth = videoInfo->current_w;
|
|
|
|
glConfig.vidHeight = videoInfo->current_h;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-08-27 15:38:55 +00:00
|
|
|
glConfig.vidWidth = 640;
|
|
|
|
glConfig.vidHeight = 480;
|
2012-08-27 14:52:41 +00:00
|
|
|
ri.Printf( PRINT_ALL,
|
|
|
|
"Cannot determine display resolution, assuming 640x480\n" );
|
|
|
|
}
|
|
|
|
|
|
|
|
glConfig.windowAspect = (float)glConfig.vidWidth / (float)glConfig.vidHeight;
|
|
|
|
}
|
|
|
|
else if ( !R_GetModeInfo( &glConfig.vidWidth, &glConfig.vidHeight, &glConfig.windowAspect, mode ) )
|
2007-09-05 18:17:46 +00:00
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, " invalid mode\n" );
|
|
|
|
return RSERR_INVALID_MODE;
|
|
|
|
}
|
|
|
|
ri.Printf( PRINT_ALL, " %d %d\n", glConfig.vidWidth, glConfig.vidHeight);
|
|
|
|
|
|
|
|
if (fullscreen)
|
|
|
|
{
|
|
|
|
flags |= SDL_FULLSCREEN;
|
|
|
|
glConfig.isFullscreen = qtrue;
|
|
|
|
}
|
|
|
|
else
|
2009-11-03 20:29:43 +00:00
|
|
|
{
|
|
|
|
if (noborder)
|
|
|
|
flags |= SDL_NOFRAME;
|
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
glConfig.isFullscreen = qfalse;
|
2009-11-03 20:29:43 +00:00
|
|
|
}
|
2007-09-05 18:17:46 +00:00
|
|
|
|
2009-09-15 02:51:09 +00:00
|
|
|
colorbits = r_colorbits->value;
|
|
|
|
if ((!colorbits) || (colorbits >= 32))
|
2007-09-05 18:17:46 +00:00
|
|
|
colorbits = 24;
|
|
|
|
|
|
|
|
if (!r_depthbits->value)
|
|
|
|
depthbits = 24;
|
|
|
|
else
|
|
|
|
depthbits = r_depthbits->value;
|
|
|
|
stencilbits = r_stencilbits->value;
|
2009-06-13 22:00:28 +00:00
|
|
|
samples = r_ext_multisample->value;
|
2007-09-05 18:17:46 +00:00
|
|
|
|
|
|
|
for (i = 0; i < 16; i++)
|
|
|
|
{
|
|
|
|
// 0 - default
|
|
|
|
// 1 - minus colorbits
|
|
|
|
// 2 - minus depthbits
|
|
|
|
// 3 - minus stencil
|
|
|
|
if ((i % 4) == 0 && i)
|
|
|
|
{
|
|
|
|
// one pass, reduce
|
|
|
|
switch (i / 4)
|
|
|
|
{
|
|
|
|
case 2 :
|
|
|
|
if (colorbits == 24)
|
|
|
|
colorbits = 16;
|
|
|
|
break;
|
|
|
|
case 1 :
|
|
|
|
if (depthbits == 24)
|
|
|
|
depthbits = 16;
|
|
|
|
else if (depthbits == 16)
|
|
|
|
depthbits = 8;
|
|
|
|
case 3 :
|
|
|
|
if (stencilbits == 24)
|
|
|
|
stencilbits = 16;
|
|
|
|
else if (stencilbits == 16)
|
|
|
|
stencilbits = 8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tcolorbits = colorbits;
|
|
|
|
tdepthbits = depthbits;
|
|
|
|
tstencilbits = stencilbits;
|
|
|
|
|
|
|
|
if ((i % 4) == 3)
|
|
|
|
{ // reduce colorbits
|
|
|
|
if (tcolorbits == 24)
|
|
|
|
tcolorbits = 16;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((i % 4) == 2)
|
|
|
|
{ // reduce depthbits
|
|
|
|
if (tdepthbits == 24)
|
|
|
|
tdepthbits = 16;
|
|
|
|
else if (tdepthbits == 16)
|
|
|
|
tdepthbits = 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((i % 4) == 1)
|
|
|
|
{ // reduce stencilbits
|
|
|
|
if (tstencilbits == 24)
|
|
|
|
tstencilbits = 16;
|
|
|
|
else if (tstencilbits == 16)
|
|
|
|
tstencilbits = 8;
|
|
|
|
else
|
|
|
|
tstencilbits = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
sdlcolorbits = 4;
|
|
|
|
if (tcolorbits == 24)
|
|
|
|
sdlcolorbits = 8;
|
|
|
|
|
2009-09-15 01:01:07 +00:00
|
|
|
#ifdef __sgi /* Fix for SGIs grabbing too many bits of color */
|
|
|
|
if (sdlcolorbits == 4)
|
|
|
|
sdlcolorbits = 0; /* Use minimum size for 16-bit color */
|
|
|
|
|
|
|
|
/* Need alpha or else SGIs choose 36+ bit RGB mode */
|
|
|
|
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 1);
|
|
|
|
#endif
|
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, sdlcolorbits );
|
|
|
|
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, sdlcolorbits );
|
|
|
|
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, sdlcolorbits );
|
|
|
|
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, tdepthbits );
|
|
|
|
SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, tstencilbits );
|
2008-04-27 19:07:57 +00:00
|
|
|
|
2009-06-13 22:00:28 +00:00
|
|
|
SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, samples ? 1 : 0 );
|
|
|
|
SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, samples );
|
|
|
|
|
2008-04-27 19:07:57 +00:00
|
|
|
if(r_stereoEnabled->integer)
|
|
|
|
{
|
|
|
|
glConfig.stereoEnabled = qtrue;
|
|
|
|
SDL_GL_SetAttribute(SDL_GL_STEREO, 1);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
glConfig.stereoEnabled = qfalse;
|
|
|
|
SDL_GL_SetAttribute(SDL_GL_STEREO, 0);
|
|
|
|
}
|
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
|
|
|
|
|
2008-01-31 17:44:33 +00:00
|
|
|
#if 0 // See http://bugzilla.icculus.org/show_bug.cgi?id=3526
|
2007-09-05 18:17:46 +00:00
|
|
|
// If not allowing software GL, demand accelerated
|
|
|
|
if( !r_allowSoftwareGL->integer )
|
|
|
|
{
|
|
|
|
if( SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 ) < 0 )
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "Unable to guarantee accelerated "
|
|
|
|
"visual with libSDL < 1.2.10\n" );
|
|
|
|
}
|
|
|
|
}
|
2008-01-31 17:44:33 +00:00
|
|
|
#endif
|
2007-09-05 18:17:46 +00:00
|
|
|
|
|
|
|
if( SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, r_swapInterval->integer ) < 0 )
|
|
|
|
ri.Printf( PRINT_ALL, "r_swapInterval requires libSDL >= 1.2.10\n" );
|
|
|
|
|
|
|
|
#ifdef USE_ICON
|
|
|
|
{
|
|
|
|
SDL_Surface *icon = SDL_CreateRGBSurfaceFrom(
|
|
|
|
(void *)CLIENT_WINDOW_ICON.pixel_data,
|
|
|
|
CLIENT_WINDOW_ICON.width,
|
|
|
|
CLIENT_WINDOW_ICON.height,
|
|
|
|
CLIENT_WINDOW_ICON.bytes_per_pixel * 8,
|
|
|
|
CLIENT_WINDOW_ICON.bytes_per_pixel * CLIENT_WINDOW_ICON.width,
|
|
|
|
#ifdef Q3_LITTLE_ENDIAN
|
|
|
|
0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000
|
2007-09-05 21:46:15 +00:00
|
|
|
#else
|
|
|
|
0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF
|
2007-09-05 18:17:46 +00:00
|
|
|
#endif
|
|
|
|
);
|
|
|
|
|
|
|
|
SDL_WM_SetIcon( icon, NULL );
|
|
|
|
SDL_FreeSurface( icon );
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
SDL_WM_SetCaption(CLIENT_WINDOW_TITLE, CLIENT_WINDOW_MIN_TITLE);
|
|
|
|
SDL_ShowCursor(0);
|
|
|
|
|
|
|
|
if (!(vidscreen = SDL_SetVideoMode(glConfig.vidWidth, glConfig.vidHeight, colorbits, flags)))
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_DEVELOPER, "SDL_SetVideoMode failed: %s\n", SDL_GetError( ) );
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
opengl_context = GLimp_GetCurrentContext();
|
|
|
|
|
|
|
|
ri.Printf( PRINT_ALL, "Using %d/%d/%d Color bits, %d depth, %d stencil display.\n",
|
|
|
|
sdlcolorbits, sdlcolorbits, sdlcolorbits, tdepthbits, tstencilbits);
|
|
|
|
|
|
|
|
glConfig.colorBits = tcolorbits;
|
|
|
|
glConfig.depthBits = tdepthbits;
|
|
|
|
glConfig.stencilBits = tstencilbits;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2007-12-11 00:19:23 +00:00
|
|
|
GLimp_DetectAvailableModes();
|
2007-12-08 10:08:05 +00:00
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
if (!vidscreen)
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "Couldn't get a visual\n" );
|
|
|
|
return RSERR_INVALID_MODE;
|
|
|
|
}
|
|
|
|
|
|
|
|
screen = vidscreen;
|
|
|
|
|
|
|
|
glstring = (char *) qglGetString (GL_RENDERER);
|
|
|
|
ri.Printf( PRINT_ALL, "GL_RENDERER: %s\n", glstring );
|
|
|
|
|
|
|
|
return RSERR_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
GLimp_StartDriverAndSetMode
|
|
|
|
===============
|
|
|
|
*/
|
2009-11-03 20:29:43 +00:00
|
|
|
static qboolean GLimp_StartDriverAndSetMode(int mode, qboolean fullscreen, qboolean noborder)
|
2007-09-05 18:17:46 +00:00
|
|
|
{
|
|
|
|
rserr_t err;
|
|
|
|
|
|
|
|
if (!SDL_WasInit(SDL_INIT_VIDEO))
|
|
|
|
{
|
2008-08-03 21:38:54 +00:00
|
|
|
char driverName[ 64 ];
|
2008-08-03 21:37:51 +00:00
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
if (SDL_Init(SDL_INIT_VIDEO) == -1)
|
|
|
|
{
|
2008-08-08 21:35:33 +00:00
|
|
|
ri.Printf( PRINT_ALL, "SDL_Init( SDL_INIT_VIDEO ) FAILED (%s)\n",
|
|
|
|
SDL_GetError());
|
2007-09-05 18:17:46 +00:00
|
|
|
return qfalse;
|
|
|
|
}
|
2008-08-03 21:37:51 +00:00
|
|
|
|
2008-08-03 21:38:54 +00:00
|
|
|
SDL_VideoDriverName( driverName, sizeof( driverName ) - 1 );
|
2008-08-03 21:37:51 +00:00
|
|
|
ri.Printf( PRINT_ALL, "SDL using driver \"%s\"\n", driverName );
|
2011-08-01 01:19:55 +00:00
|
|
|
ri.Cvar_Set( "r_sdlDriver", driverName );
|
2007-09-05 18:17:46 +00:00
|
|
|
}
|
|
|
|
|
2011-08-01 01:19:55 +00:00
|
|
|
if (fullscreen && ri.Cvar_VariableIntegerValue( "in_nograb" ) )
|
2007-09-05 18:17:46 +00:00
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "Fullscreen not allowed with in_nograb 1\n");
|
|
|
|
ri.Cvar_Set( "r_fullscreen", "0" );
|
|
|
|
r_fullscreen->modified = qfalse;
|
|
|
|
fullscreen = qfalse;
|
|
|
|
}
|
2009-11-03 20:29:43 +00:00
|
|
|
|
|
|
|
err = GLimp_SetMode(mode, fullscreen, noborder);
|
2007-09-05 18:17:46 +00:00
|
|
|
|
|
|
|
switch ( err )
|
|
|
|
{
|
|
|
|
case RSERR_INVALID_FULLSCREEN:
|
|
|
|
ri.Printf( PRINT_ALL, "...WARNING: fullscreen unavailable in this mode\n" );
|
|
|
|
return qfalse;
|
|
|
|
case RSERR_INVALID_MODE:
|
|
|
|
ri.Printf( PRINT_ALL, "...WARNING: could not set the given mode (%d)\n", mode );
|
|
|
|
return qfalse;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return qtrue;
|
|
|
|
}
|
2008-06-13 02:28:51 +00:00
|
|
|
|
|
|
|
static qboolean GLimp_HaveExtension(const char *ext)
|
|
|
|
{
|
|
|
|
const char *ptr = Q_stristr( glConfig.extensions_string, ext );
|
|
|
|
if (ptr == NULL)
|
|
|
|
return qfalse;
|
|
|
|
ptr += strlen(ext);
|
|
|
|
return ((*ptr == ' ') || (*ptr == '\0')); // verify it's complete string.
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
/*
|
|
|
|
===============
|
|
|
|
GLimp_InitExtensions
|
|
|
|
===============
|
|
|
|
*/
|
|
|
|
static void GLimp_InitExtensions( void )
|
|
|
|
{
|
|
|
|
if ( !r_allowExtensions->integer )
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "* IGNORING OPENGL EXTENSIONS *\n" );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
ri.Printf( PRINT_ALL, "Initializing OpenGL extensions\n" );
|
|
|
|
|
2008-06-13 02:28:51 +00:00
|
|
|
glConfig.textureCompression = TC_NONE;
|
|
|
|
|
|
|
|
// GL_EXT_texture_compression_s3tc
|
|
|
|
if ( GLimp_HaveExtension( "GL_ARB_texture_compression" ) &&
|
|
|
|
GLimp_HaveExtension( "GL_EXT_texture_compression_s3tc" ) )
|
2007-09-05 18:17:46 +00:00
|
|
|
{
|
|
|
|
if ( r_ext_compressed_textures->value )
|
|
|
|
{
|
2008-06-13 02:28:51 +00:00
|
|
|
glConfig.textureCompression = TC_S3TC_ARB;
|
|
|
|
ri.Printf( PRINT_ALL, "...using GL_EXT_texture_compression_s3tc\n" );
|
2007-09-05 18:17:46 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-06-13 02:28:51 +00:00
|
|
|
ri.Printf( PRINT_ALL, "...ignoring GL_EXT_texture_compression_s3tc\n" );
|
2007-09-05 18:17:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-06-13 02:28:51 +00:00
|
|
|
ri.Printf( PRINT_ALL, "...GL_EXT_texture_compression_s3tc not found\n" );
|
|
|
|
}
|
|
|
|
|
|
|
|
// GL_S3_s3tc ... legacy extension before GL_EXT_texture_compression_s3tc.
|
|
|
|
if (glConfig.textureCompression == TC_NONE)
|
|
|
|
{
|
|
|
|
if ( GLimp_HaveExtension( "GL_S3_s3tc" ) )
|
|
|
|
{
|
|
|
|
if ( r_ext_compressed_textures->value )
|
|
|
|
{
|
|
|
|
glConfig.textureCompression = TC_S3TC;
|
|
|
|
ri.Printf( PRINT_ALL, "...using GL_S3_s3tc\n" );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "...ignoring GL_S3_s3tc\n" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "...GL_S3_s3tc not found\n" );
|
|
|
|
}
|
2007-09-05 18:17:46 +00:00
|
|
|
}
|
|
|
|
|
2008-06-13 02:28:51 +00:00
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
// GL_EXT_texture_env_add
|
|
|
|
glConfig.textureEnvAddAvailable = qfalse;
|
2008-06-13 02:28:51 +00:00
|
|
|
if ( GLimp_HaveExtension( "EXT_texture_env_add" ) )
|
2007-09-05 18:17:46 +00:00
|
|
|
{
|
|
|
|
if ( r_ext_texture_env_add->integer )
|
|
|
|
{
|
|
|
|
glConfig.textureEnvAddAvailable = qtrue;
|
|
|
|
ri.Printf( PRINT_ALL, "...using GL_EXT_texture_env_add\n" );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
glConfig.textureEnvAddAvailable = qfalse;
|
|
|
|
ri.Printf( PRINT_ALL, "...ignoring GL_EXT_texture_env_add\n" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "...GL_EXT_texture_env_add not found\n" );
|
|
|
|
}
|
|
|
|
|
2007-09-12 18:02:38 +00:00
|
|
|
// GL_ARB_multitexture
|
|
|
|
qglMultiTexCoord2fARB = NULL;
|
|
|
|
qglActiveTextureARB = NULL;
|
|
|
|
qglClientActiveTextureARB = NULL;
|
2008-06-13 02:28:51 +00:00
|
|
|
if ( GLimp_HaveExtension( "GL_ARB_multitexture" ) )
|
2007-09-12 18:02:38 +00:00
|
|
|
{
|
|
|
|
if ( r_ext_multitexture->value )
|
|
|
|
{
|
2007-11-25 23:41:01 +00:00
|
|
|
qglMultiTexCoord2fARB = SDL_GL_GetProcAddress( "glMultiTexCoord2fARB" );
|
|
|
|
qglActiveTextureARB = SDL_GL_GetProcAddress( "glActiveTextureARB" );
|
|
|
|
qglClientActiveTextureARB = SDL_GL_GetProcAddress( "glClientActiveTextureARB" );
|
2007-09-12 18:02:38 +00:00
|
|
|
|
|
|
|
if ( qglActiveTextureARB )
|
|
|
|
{
|
|
|
|
GLint glint = 0;
|
|
|
|
qglGetIntegerv( GL_MAX_TEXTURE_UNITS_ARB, &glint );
|
|
|
|
glConfig.numTextureUnits = (int) glint;
|
|
|
|
if ( glConfig.numTextureUnits > 1 )
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "...using GL_ARB_multitexture\n" );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
qglMultiTexCoord2fARB = NULL;
|
|
|
|
qglActiveTextureARB = NULL;
|
|
|
|
qglClientActiveTextureARB = NULL;
|
|
|
|
ri.Printf( PRINT_ALL, "...not using GL_ARB_multitexture, < 2 texture units\n" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "...ignoring GL_ARB_multitexture\n" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "...GL_ARB_multitexture not found\n" );
|
|
|
|
}
|
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
// GL_EXT_compiled_vertex_array
|
2008-06-13 02:28:51 +00:00
|
|
|
if ( GLimp_HaveExtension( "GL_EXT_compiled_vertex_array" ) )
|
2007-09-05 18:17:46 +00:00
|
|
|
{
|
|
|
|
if ( r_ext_compiled_vertex_array->value )
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "...using GL_EXT_compiled_vertex_array\n" );
|
|
|
|
qglLockArraysEXT = ( void ( APIENTRY * )( GLint, GLint ) ) SDL_GL_GetProcAddress( "glLockArraysEXT" );
|
|
|
|
qglUnlockArraysEXT = ( void ( APIENTRY * )( void ) ) SDL_GL_GetProcAddress( "glUnlockArraysEXT" );
|
|
|
|
if (!qglLockArraysEXT || !qglUnlockArraysEXT)
|
|
|
|
{
|
|
|
|
ri.Error (ERR_FATAL, "bad getprocaddress");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "...ignoring GL_EXT_compiled_vertex_array\n" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n" );
|
|
|
|
}
|
|
|
|
|
|
|
|
textureFilterAnisotropic = qfalse;
|
2008-06-13 02:28:51 +00:00
|
|
|
if ( GLimp_HaveExtension( "GL_EXT_texture_filter_anisotropic" ) )
|
2007-09-05 18:17:46 +00:00
|
|
|
{
|
|
|
|
if ( r_ext_texture_filter_anisotropic->integer ) {
|
|
|
|
qglGetIntegerv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, (GLint *)&maxAnisotropy );
|
|
|
|
if ( maxAnisotropy <= 0 ) {
|
|
|
|
ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not properly supported!\n" );
|
|
|
|
maxAnisotropy = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "...using GL_EXT_texture_filter_anisotropic (max: %i)\n", maxAnisotropy );
|
|
|
|
textureFilterAnisotropic = qtrue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "...ignoring GL_EXT_texture_filter_anisotropic\n" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "...GL_EXT_texture_filter_anisotropic not found\n" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#define R_MODE_FALLBACK 3 // 640 * 480
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
GLimp_Init
|
|
|
|
|
|
|
|
This routine is responsible for initializing the OS specific portions
|
|
|
|
of OpenGL
|
|
|
|
===============
|
|
|
|
*/
|
|
|
|
void GLimp_Init( void )
|
|
|
|
{
|
|
|
|
r_allowSoftwareGL = ri.Cvar_Get( "r_allowSoftwareGL", "0", CVAR_LATCH );
|
2008-08-09 13:20:00 +00:00
|
|
|
r_sdlDriver = ri.Cvar_Get( "r_sdlDriver", "", CVAR_ROM );
|
2009-09-14 22:07:34 +00:00
|
|
|
r_allowResize = ri.Cvar_Get( "r_allowResize", "0", CVAR_ARCHIVE );
|
2009-11-06 15:34:05 +00:00
|
|
|
r_centerWindow = ri.Cvar_Get( "r_centerWindow", "0", CVAR_ARCHIVE );
|
2007-09-05 18:17:46 +00:00
|
|
|
|
2011-08-01 01:19:55 +00:00
|
|
|
if( ri.Cvar_VariableIntegerValue( "com_abnormalExit" ) )
|
2010-02-15 16:20:33 +00:00
|
|
|
{
|
|
|
|
ri.Cvar_Set( "r_mode", va( "%d", R_MODE_FALLBACK ) );
|
|
|
|
ri.Cvar_Set( "r_fullscreen", "0" );
|
|
|
|
ri.Cvar_Set( "r_centerWindow", "0" );
|
|
|
|
ri.Cvar_Set( "com_abnormalExit", "0" );
|
|
|
|
}
|
|
|
|
|
2011-08-01 01:19:55 +00:00
|
|
|
ri.Sys_SetEnv( "SDL_VIDEO_CENTERED", r_centerWindow->integer ? "1" : "" );
|
2009-11-03 20:29:43 +00:00
|
|
|
|
2011-08-01 01:19:55 +00:00
|
|
|
ri.Sys_GLimpInit( );
|
2008-08-08 21:35:33 +00:00
|
|
|
|
2009-09-14 12:34:31 +00:00
|
|
|
// Create the window and set up the context
|
2009-11-03 20:29:43 +00:00
|
|
|
if(GLimp_StartDriverAndSetMode(r_mode->integer, r_fullscreen->integer, r_noborder->integer))
|
2009-09-14 12:34:31 +00:00
|
|
|
goto success;
|
|
|
|
|
|
|
|
// Try again, this time in a platform specific "safe mode"
|
2011-08-01 01:19:55 +00:00
|
|
|
ri.Sys_GLimpSafeInit( );
|
2009-09-14 12:34:31 +00:00
|
|
|
|
2009-11-03 20:29:43 +00:00
|
|
|
if(GLimp_StartDriverAndSetMode(r_mode->integer, r_fullscreen->integer, qfalse))
|
2009-09-14 12:34:31 +00:00
|
|
|
goto success;
|
|
|
|
|
|
|
|
// Finally, try the default screen resolution
|
|
|
|
if( r_mode->integer != R_MODE_FALLBACK )
|
2007-09-05 18:17:46 +00:00
|
|
|
{
|
2009-09-14 12:34:31 +00:00
|
|
|
ri.Printf( PRINT_ALL, "Setting r_mode %d failed, falling back on r_mode %d\n",
|
|
|
|
r_mode->integer, R_MODE_FALLBACK );
|
|
|
|
|
2010-02-15 16:20:33 +00:00
|
|
|
if(GLimp_StartDriverAndSetMode(R_MODE_FALLBACK, qfalse, qfalse))
|
2009-09-14 12:34:31 +00:00
|
|
|
goto success;
|
2007-09-05 18:17:46 +00:00
|
|
|
}
|
|
|
|
|
2009-09-14 12:34:31 +00:00
|
|
|
// Nothing worked, give up
|
2011-05-14 14:32:43 +00:00
|
|
|
ri.Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem" );
|
2007-09-05 18:17:46 +00:00
|
|
|
|
2009-09-14 12:34:31 +00:00
|
|
|
success:
|
2007-09-05 18:17:46 +00:00
|
|
|
// This values force the UI to disable driver selection
|
|
|
|
glConfig.driverType = GLDRV_ICD;
|
|
|
|
glConfig.hardwareType = GLHW_GENERIC;
|
2009-10-25 21:48:48 +00:00
|
|
|
glConfig.deviceSupportsGamma = SDL_SetGamma( 1.0f, 1.0f, 1.0f ) >= 0;
|
|
|
|
|
|
|
|
// Mysteriously, if you use an NVidia graphics card and multiple monitors,
|
|
|
|
// SDL_SetGamma will incorrectly return false... the first time; ask
|
|
|
|
// again and you get the correct answer. This is a suspected driver bug, see
|
|
|
|
// http://bugzilla.icculus.org/show_bug.cgi?id=4316
|
|
|
|
glConfig.deviceSupportsGamma = SDL_SetGamma( 1.0f, 1.0f, 1.0f ) >= 0;
|
2007-09-05 18:17:46 +00:00
|
|
|
|
2012-07-01 17:01:30 +00:00
|
|
|
if ( -1 == r_ignorehwgamma->integer)
|
|
|
|
glConfig.deviceSupportsGamma = 1;
|
|
|
|
|
|
|
|
if ( 1 == r_ignorehwgamma->integer)
|
|
|
|
glConfig.deviceSupportsGamma = 0;
|
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
// get our config strings
|
|
|
|
Q_strncpyz( glConfig.vendor_string, (char *) qglGetString (GL_VENDOR), sizeof( glConfig.vendor_string ) );
|
|
|
|
Q_strncpyz( glConfig.renderer_string, (char *) qglGetString (GL_RENDERER), sizeof( glConfig.renderer_string ) );
|
|
|
|
if (*glConfig.renderer_string && glConfig.renderer_string[strlen(glConfig.renderer_string) - 1] == '\n')
|
|
|
|
glConfig.renderer_string[strlen(glConfig.renderer_string) - 1] = 0;
|
|
|
|
Q_strncpyz( glConfig.version_string, (char *) qglGetString (GL_VERSION), sizeof( glConfig.version_string ) );
|
|
|
|
Q_strncpyz( glConfig.extensions_string, (char *) qglGetString (GL_EXTENSIONS), sizeof( glConfig.extensions_string ) );
|
|
|
|
|
|
|
|
// initialize extensions
|
|
|
|
GLimp_InitExtensions( );
|
|
|
|
|
2007-12-08 10:08:05 +00:00
|
|
|
ri.Cvar_Get( "r_availableModes", "", CVAR_ROM );
|
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
// This depends on SDL_INIT_VIDEO, hence having it here
|
2011-08-01 01:19:55 +00:00
|
|
|
ri.IN_Init( );
|
2007-09-05 18:17:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
===============
|
|
|
|
GLimp_EndFrame
|
|
|
|
|
|
|
|
Responsible for doing a swapbuffers
|
|
|
|
===============
|
|
|
|
*/
|
|
|
|
void GLimp_EndFrame( void )
|
|
|
|
{
|
|
|
|
// don't flip if drawing to front buffer
|
|
|
|
if ( Q_stricmp( r_drawBuffer->string, "GL_FRONT" ) != 0 )
|
|
|
|
{
|
|
|
|
SDL_GL_SwapBuffers();
|
|
|
|
}
|
|
|
|
|
|
|
|
if( r_fullscreen->modified )
|
|
|
|
{
|
|
|
|
qboolean fullscreen;
|
2008-08-22 22:16:37 +00:00
|
|
|
qboolean needToToggle = qtrue;
|
2007-09-05 18:17:46 +00:00
|
|
|
qboolean sdlToggled = qfalse;
|
|
|
|
SDL_Surface *s = SDL_GetVideoSurface( );
|
|
|
|
|
|
|
|
if( s )
|
|
|
|
{
|
|
|
|
// Find out the current state
|
2008-08-22 22:16:37 +00:00
|
|
|
fullscreen = !!( s->flags & SDL_FULLSCREEN );
|
2008-03-26 16:20:21 +00:00
|
|
|
|
2011-08-01 01:19:55 +00:00
|
|
|
if( r_fullscreen->integer && ri.Cvar_VariableIntegerValue( "in_nograb" ) )
|
2008-03-26 16:20:21 +00:00
|
|
|
{
|
|
|
|
ri.Printf( PRINT_ALL, "Fullscreen not allowed with in_nograb 1\n");
|
|
|
|
ri.Cvar_Set( "r_fullscreen", "0" );
|
|
|
|
r_fullscreen->modified = qfalse;
|
|
|
|
}
|
2007-09-05 18:17:46 +00:00
|
|
|
|
|
|
|
// Is the state we want different from the current state?
|
2008-08-22 22:16:37 +00:00
|
|
|
needToToggle = !!r_fullscreen->integer != fullscreen;
|
|
|
|
|
|
|
|
if( needToToggle )
|
2007-09-05 18:17:46 +00:00
|
|
|
sdlToggled = SDL_WM_ToggleFullScreen( s );
|
|
|
|
}
|
|
|
|
|
2008-08-22 22:16:37 +00:00
|
|
|
if( needToToggle )
|
|
|
|
{
|
|
|
|
// SDL_WM_ToggleFullScreen didn't work, so do it the slow way
|
|
|
|
if( !sdlToggled )
|
2011-08-01 01:19:55 +00:00
|
|
|
ri.Cmd_ExecuteText(EXEC_APPEND, "vid_restart");
|
2007-09-05 18:17:46 +00:00
|
|
|
|
2011-08-01 01:19:55 +00:00
|
|
|
ri.IN_Restart( );
|
2008-08-22 22:16:37 +00:00
|
|
|
}
|
2008-08-09 13:20:00 +00:00
|
|
|
|
2007-09-05 18:17:46 +00:00
|
|
|
r_fullscreen->modified = qfalse;
|
|
|
|
}
|
|
|
|
}
|