mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 13:40:56 +00:00
* Whitespace consistency in tr_init.c
This commit is contained in:
parent
6f85c247e3
commit
e8d3c48535
1 changed files with 51 additions and 51 deletions
|
@ -235,41 +235,41 @@ GL_CheckErrors
|
|||
==================
|
||||
*/
|
||||
void GL_CheckErrors( void ) {
|
||||
int err;
|
||||
char s[64];
|
||||
int err;
|
||||
char s[64];
|
||||
|
||||
err = qglGetError();
|
||||
if ( err == GL_NO_ERROR ) {
|
||||
return;
|
||||
}
|
||||
if ( r_ignoreGLErrors->integer ) {
|
||||
return;
|
||||
}
|
||||
switch( err ) {
|
||||
case GL_INVALID_ENUM:
|
||||
strcpy( s, "GL_INVALID_ENUM" );
|
||||
break;
|
||||
case GL_INVALID_VALUE:
|
||||
strcpy( s, "GL_INVALID_VALUE" );
|
||||
break;
|
||||
case GL_INVALID_OPERATION:
|
||||
strcpy( s, "GL_INVALID_OPERATION" );
|
||||
break;
|
||||
case GL_STACK_OVERFLOW:
|
||||
strcpy( s, "GL_STACK_OVERFLOW" );
|
||||
break;
|
||||
case GL_STACK_UNDERFLOW:
|
||||
strcpy( s, "GL_STACK_UNDERFLOW" );
|
||||
break;
|
||||
case GL_OUT_OF_MEMORY:
|
||||
strcpy( s, "GL_OUT_OF_MEMORY" );
|
||||
break;
|
||||
default:
|
||||
Com_sprintf( s, sizeof(s), "%i", err);
|
||||
break;
|
||||
}
|
||||
err = qglGetError();
|
||||
if ( err == GL_NO_ERROR ) {
|
||||
return;
|
||||
}
|
||||
if ( r_ignoreGLErrors->integer ) {
|
||||
return;
|
||||
}
|
||||
switch( err ) {
|
||||
case GL_INVALID_ENUM:
|
||||
strcpy( s, "GL_INVALID_ENUM" );
|
||||
break;
|
||||
case GL_INVALID_VALUE:
|
||||
strcpy( s, "GL_INVALID_VALUE" );
|
||||
break;
|
||||
case GL_INVALID_OPERATION:
|
||||
strcpy( s, "GL_INVALID_OPERATION" );
|
||||
break;
|
||||
case GL_STACK_OVERFLOW:
|
||||
strcpy( s, "GL_STACK_OVERFLOW" );
|
||||
break;
|
||||
case GL_STACK_UNDERFLOW:
|
||||
strcpy( s, "GL_STACK_UNDERFLOW" );
|
||||
break;
|
||||
case GL_OUT_OF_MEMORY:
|
||||
strcpy( s, "GL_OUT_OF_MEMORY" );
|
||||
break;
|
||||
default:
|
||||
Com_sprintf( s, sizeof(s), "%i", err);
|
||||
break;
|
||||
}
|
||||
|
||||
ri.Error( ERR_FATAL, "GL_CheckErrors: %s", s );
|
||||
ri.Error( ERR_FATAL, "GL_CheckErrors: %s", s );
|
||||
}
|
||||
|
||||
|
||||
|
@ -278,25 +278,25 @@ void GL_CheckErrors( void ) {
|
|||
*/
|
||||
typedef struct vidmode_s
|
||||
{
|
||||
const char *description;
|
||||
int width, height;
|
||||
float pixelAspect; // pixel width / height
|
||||
const char *description;
|
||||
int width, height;
|
||||
float pixelAspect; // pixel width / height
|
||||
} vidmode_t;
|
||||
|
||||
vidmode_t r_vidModes[] =
|
||||
{
|
||||
{ "Mode 0: 320x240", 320, 240, 1 },
|
||||
{ "Mode 1: 400x300", 400, 300, 1 },
|
||||
{ "Mode 2: 512x384", 512, 384, 1 },
|
||||
{ "Mode 3: 640x480", 640, 480, 1 },
|
||||
{ "Mode 4: 800x600", 800, 600, 1 },
|
||||
{ "Mode 5: 960x720", 960, 720, 1 },
|
||||
{ "Mode 6: 1024x768", 1024, 768, 1 },
|
||||
{ "Mode 7: 1152x864", 1152, 864, 1 },
|
||||
{ "Mode 8: 1280x1024", 1280, 1024, 1 },
|
||||
{ "Mode 9: 1600x1200", 1600, 1200, 1 },
|
||||
{ "Mode 10: 2048x1536", 2048, 1536, 1 },
|
||||
{ "Mode 11: 856x480 (wide)",856, 480, 1 }
|
||||
{ "Mode 0: 320x240", 320, 240, 1 },
|
||||
{ "Mode 1: 400x300", 400, 300, 1 },
|
||||
{ "Mode 2: 512x384", 512, 384, 1 },
|
||||
{ "Mode 3: 640x480", 640, 480, 1 },
|
||||
{ "Mode 4: 800x600", 800, 600, 1 },
|
||||
{ "Mode 5: 960x720", 960, 720, 1 },
|
||||
{ "Mode 6: 1024x768", 1024, 768, 1 },
|
||||
{ "Mode 7: 1152x864", 1152, 864, 1 },
|
||||
{ "Mode 8: 1280x1024", 1280, 1024, 1 },
|
||||
{ "Mode 9: 1600x1200", 1600, 1200, 1 },
|
||||
{ "Mode 10: 2048x1536", 2048, 1536, 1 },
|
||||
{ "Mode 11: 856x480 (wide)",856, 480, 1 }
|
||||
};
|
||||
static int s_numVidModes = ( sizeof( r_vidModes ) / sizeof( r_vidModes[0] ) );
|
||||
|
||||
|
@ -304,8 +304,8 @@ qboolean R_GetModeInfo( int *width, int *height, float *windowAspect, int mode )
|
|||
vidmode_t *vm;
|
||||
float pixelAspect;
|
||||
|
||||
if ( mode < -1 ) {
|
||||
return qfalse;
|
||||
if ( mode < -1 ) {
|
||||
return qfalse;
|
||||
}
|
||||
if ( mode >= s_numVidModes ) {
|
||||
return qfalse;
|
||||
|
@ -315,7 +315,7 @@ qboolean R_GetModeInfo( int *width, int *height, float *windowAspect, int mode )
|
|||
*width = r_customwidth->integer;
|
||||
*height = r_customheight->integer;
|
||||
pixelAspect = r_customPixelAspect->value;
|
||||
} else {
|
||||
} else {
|
||||
vm = &r_vidModes[mode];
|
||||
|
||||
*width = vm->width;
|
||||
|
|
Loading…
Reference in a new issue