Index: code/q3_ui/ui_atoms.c =================================================================== --- code/q3_ui/ui_atoms.c (revision 581) +++ code/q3_ui/ui_atoms.c (working copy) @@ -353,15 +353,15 @@ // draw the colored text trap_R_SetColor( color ); - ax = x * uis.xscale + uis.bias; - ay = y * uis.yscale; + ax = x * uis.scale + uis.xbias; + ay = y * uis.scale + uis.ybias; s = str; while ( *s ) { ch = *s & 127; if ( ch == ' ' ) { - ax += ((float)PROPB_SPACE_WIDTH + (float)PROPB_GAP_WIDTH)* uis.xscale; + ax += ((float)PROPB_SPACE_WIDTH + (float)PROPB_GAP_WIDTH)* uis.scale; } else if ( ch >= 'A' && ch <= 'Z' ) { ch -= 'A'; @@ -369,10 +369,10 @@ frow = (float)propMapB[ch][1] / 256.0f; fwidth = (float)propMapB[ch][2] / 256.0f; fheight = (float)PROPB_HEIGHT / 256.0f; - aw = (float)propMapB[ch][2] * uis.xscale; - ah = (float)PROPB_HEIGHT * uis.yscale; + aw = (float)propMapB[ch][2] * uis.scale; + ah = (float)PROPB_HEIGHT * uis.scale; trap_R_DrawStretchPic( ax, ay, aw, ah, fcol, frow, fcol+fwidth, frow+fheight, uis.charsetPropB ); - ax += (aw + (float)PROPB_GAP_WIDTH * uis.xscale); + ax += (aw + (float)PROPB_GAP_WIDTH * uis.scale); } s++; } @@ -463,27 +463,27 @@ // draw the colored text trap_R_SetColor( color ); - ax = x * uis.xscale + uis.bias; - ay = y * uis.yscale; + ax = x * uis.scale + uis.xbias; + ay = y * uis.scale + uis.ybias; s = str; while ( *s ) { ch = *s & 127; if ( ch == ' ' ) { - aw = (float)PROP_SPACE_WIDTH * uis.xscale * sizeScale; + aw = (float)PROP_SPACE_WIDTH * uis.scale * sizeScale; } else if ( propMap[ch][2] != -1 ) { fcol = (float)propMap[ch][0] / 256.0f; frow = (float)propMap[ch][1] / 256.0f; fwidth = (float)propMap[ch][2] / 256.0f; fheight = (float)PROP_HEIGHT / 256.0f; - aw = (float)propMap[ch][2] * uis.xscale * sizeScale; - ah = (float)PROP_HEIGHT * uis.yscale * sizeScale; + aw = (float)propMap[ch][2] * uis.scale * sizeScale; + ah = (float)PROP_HEIGHT * uis.scale * sizeScale; trap_R_DrawStretchPic( ax, ay, aw, ah, fcol, frow, fcol+fwidth, frow+fheight, charset ); } - ax += (aw + (float)PROP_GAP_WIDTH * uis.xscale * sizeScale); + ax += (aw + (float)PROP_GAP_WIDTH * uis.scale * sizeScale); s++; } @@ -654,10 +654,10 @@ // draw the colored text trap_R_SetColor( color ); - ax = x * uis.xscale + uis.bias; - ay = y * uis.yscale; - aw = charw * uis.xscale; - ah = charh * uis.yscale; + ax = x * uis.scale + uis.xbias; + ay = y * uis.scale + uis.ybias; + aw = charw * uis.scale; + ah = charh * uis.scale; s = str; while ( *s ) @@ -1068,16 +1068,19 @@ trap_GetGlconfig( &uis.glconfig ); // for 640x480 virtualized screen - uis.xscale = uis.glconfig.vidWidth * (1.0/640.0); - uis.yscale = uis.glconfig.vidHeight * (1.0/480.0); + uis.scale = uis.glconfig.vidHeight * (1.0/480.0); if ( uis.glconfig.vidWidth * 480 > uis.glconfig.vidHeight * 640 ) { // wide screen - uis.bias = 0.5 * ( uis.glconfig.vidWidth - ( uis.glconfig.vidHeight * (640.0/480.0) ) ); - uis.xscale = uis.yscale; - } - else { + uis.xbias = 0.5 * ( uis.glconfig.vidWidth - ( uis.glconfig.vidHeight * (640.0/480.0) ) ); + uis.ybias = 0; + } else if ( uis.glconfig.vidWidth * 480 < uis.glconfig.vidHeight * 640 ) { + // narrow screen + uis.xbias = 0; + uis.ybias = 0.5 * ( uis.glconfig.vidHeight - ( uis.glconfig.vidWidth * (480.0/640.0) ) ); + uis.scale = uis.glconfig.vidWidth * (1.0/640.0); + } else { // no wide screen - uis.bias = 0; + uis.xbias = uis.ybias = 0; } // initialize the menu system @@ -1096,10 +1099,10 @@ */ void UI_AdjustFrom640( float *x, float *y, float *w, float *h ) { // expect valid pointers - *x = *x * uis.xscale + uis.bias; - *y *= uis.yscale; - *w *= uis.xscale; - *h *= uis.yscale; + *x = *x * uis.scale + uis.xbias; + *y = *y * uis.scale + uis.ybias; + *w *= uis.scale; + *h *= uis.scale; } void UI_DrawNamedPic( float x, float y, float width, float height, const char *picname ) { Index: code/q3_ui/ui_local.h =================================================================== --- code/q3_ui/ui_local.h (revision 581) +++ code/q3_ui/ui_local.h (working copy) @@ -547,9 +547,9 @@ qhandle_t cursor; qhandle_t rb_on; qhandle_t rb_off; - float xscale; - float yscale; - float bias; + float scale; + float xbias; + float ybias; qboolean demoversion; qboolean firstdraw; } uiStatic_t; Index: code/client/cl_scrn.c =================================================================== --- code/client/cl_scrn.c (revision 581) +++ code/client/cl_scrn.c (working copy) @@ -438,10 +438,11 @@ void SCR_DrawScreenField( stereoFrame_t stereoFrame ) { re.BeginFrame( stereoFrame ); - // wide aspect ratio screens need to have the sides cleared + // wide aspect ratio screens need to have the sides, + // narrow ratio screens the top and bottom cleared // unless they are displaying game renderings if ( cls.state != CA_ACTIVE && cls.state != CA_CINEMATIC ) { - if ( cls.glconfig.vidWidth * 480 > cls.glconfig.vidHeight * 640 ) { + if ( cls.glconfig.vidWidth * 480 != cls.glconfig.vidHeight * 640 ) { re.SetColor( g_color_table[0] ); re.DrawStretchPic( 0, 0, cls.glconfig.vidWidth, cls.glconfig.vidHeight, 0, 0, 0, 0, cls.whiteShader ); re.SetColor( NULL );