mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 23:02:01 +00:00
Reverted r2145 per Timbo's suggestion.
This commit is contained in:
parent
efd5f47bf6
commit
1469df546e
3 changed files with 8 additions and 41 deletions
|
@ -297,7 +297,7 @@ static graphicsoptions_t s_graphicsoptions;
|
|||
static InitialVideoOptions_s s_ivo_templates[] =
|
||||
{
|
||||
{
|
||||
6, qtrue, 3, 0, 2, 2, 1, 0, qtrue // Note: If r_availableModes is found, mode is changed to -2.
|
||||
6, qtrue, 3, 0, 2, 2, 1, 0, qtrue
|
||||
},
|
||||
{
|
||||
4, qtrue, 2, 0, 2, 1, 1, 0, qtrue // JDC: this was tq 3
|
||||
|
@ -372,10 +372,6 @@ static int GraphicsOptions_FindBuiltinResolution( int mode )
|
|||
if( !resolutionsDetected )
|
||||
return mode;
|
||||
|
||||
// Display resolution
|
||||
if( mode == 0 )
|
||||
return -2;
|
||||
|
||||
if( mode < 0 )
|
||||
return -1;
|
||||
|
||||
|
@ -400,10 +396,6 @@ static int GraphicsOptions_FindDetectedResolution( int mode )
|
|||
if( !resolutionsDetected )
|
||||
return mode;
|
||||
|
||||
// Display resolution
|
||||
if( mode == -2 )
|
||||
return 0;
|
||||
|
||||
if( mode < 0 )
|
||||
return -1;
|
||||
|
||||
|
@ -433,16 +425,11 @@ static void GraphicsOptions_GetAspectRatios( void )
|
|||
char str[ sizeof(ratioBuf[0]) ];
|
||||
|
||||
// calculate resolution's aspect ratio
|
||||
x = strchr( resolutions[r], 'x' );
|
||||
if (x) {
|
||||
x++;
|
||||
Q_strncpyz( str, resolutions[r], x-resolutions[r] );
|
||||
w = atoi( str );
|
||||
h = atoi( x );
|
||||
Com_sprintf( str, sizeof(str), "%.2f:1", (float)w / (float)h );
|
||||
} else {
|
||||
Q_strncpyz(str, "Unknown", sizeof(str));
|
||||
}
|
||||
x = strchr( resolutions[r], 'x' ) + 1;
|
||||
Q_strncpyz( str, resolutions[r], x-resolutions[r] );
|
||||
w = atoi( str );
|
||||
h = atoi( x );
|
||||
Com_sprintf( str, sizeof(str), "%.2f:1", (float)w / (float)h );
|
||||
|
||||
// rename common ratios ("1.33:1" -> "4:3")
|
||||
for( i = 0; knownRatios[i][0]; i++ ) {
|
||||
|
@ -502,13 +489,6 @@ static void GraphicsOptions_GetResolutions( void )
|
|||
{
|
||||
char* s = resbuf;
|
||||
unsigned int i = 0;
|
||||
|
||||
// Add display resolution video mode
|
||||
detectedResolutions[i++] = "Display Resolution";
|
||||
|
||||
// Use display resolution in "Very High Quality" template
|
||||
s_ivo_templates[0].mode = -2;
|
||||
|
||||
while( s && i < ARRAY_LEN(detectedResolutions)-1 )
|
||||
{
|
||||
detectedResolutions[i++] = s;
|
||||
|
|
|
@ -292,17 +292,14 @@ qboolean R_GetModeInfo( int *width, int *height, float *windowAspect, int mode )
|
|||
vidmode_t *vm;
|
||||
float pixelAspect;
|
||||
|
||||
if ( mode < -2 ) {
|
||||
if ( mode < -1 ) {
|
||||
return qfalse;
|
||||
}
|
||||
if ( mode >= s_numVidModes ) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if ( mode == -2 ) {
|
||||
// Must set width and height to display size before calling this function!
|
||||
pixelAspect = 1.0f;
|
||||
} else if ( mode == -1 ) {
|
||||
if ( mode == -1 ) {
|
||||
*width = r_customwidth->integer;
|
||||
*height = r_customheight->integer;
|
||||
pixelAspect = r_customPixelAspect->value;
|
||||
|
|
|
@ -248,16 +248,6 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
|
|||
}
|
||||
}
|
||||
|
||||
if( videoInfo->current_h > 0 ) {
|
||||
glConfig.vidWidth = videoInfo->current_w;
|
||||
glConfig.vidHeight = videoInfo->current_h;
|
||||
} else {
|
||||
glConfig.vidWidth = 480;
|
||||
glConfig.vidHeight = 640;
|
||||
ri.Printf( PRINT_ALL,
|
||||
"Cannot determine display resolution, assuming 640x480\n" );
|
||||
}
|
||||
|
||||
ri.Printf (PRINT_ALL, "...setting mode %d:", mode );
|
||||
|
||||
if ( !R_GetModeInfo( &glConfig.vidWidth, &glConfig.vidHeight, &glConfig.windowAspect, mode ) )
|
||||
|
|
Loading…
Reference in a new issue