Index: code/q3_ui/ui_atoms.c =================================================================== --- code/q3_ui/ui_atoms.c (revision 2013) +++ code/q3_ui/ui_atoms.c (working copy) @@ -879,10 +879,10 @@ // update mouse screen position uis.cursorx += dx; - if (uis.cursorx < 0) - uis.cursorx = 0; - else if (uis.cursorx > SCREEN_WIDTH) - uis.cursorx = SCREEN_WIDTH; + if (uis.cursorx < -uis.bias) + uis.cursorx = -uis.bias; + else if (uis.cursorx > SCREEN_WIDTH+uis.bias) + uis.cursorx = SCREEN_WIDTH+uis.bias; uis.cursory += dy; if (uis.cursory < 0) @@ -1139,6 +1139,24 @@ /* ================ +UI_DrawPicFullScreen +================= +*/ +void UI_DrawPicFullScreen( qhandle_t hShader ) { + // draw black shader in widescreen to clear the screen + if (uis.bias) { + const float black[4] = { 0.0f, 0.0f, 0.0f, 1.0f }; + + trap_R_SetColor( black ); + trap_R_DrawStretchPic( 0, 0, uis.glconfig.vidWidth, uis.glconfig.vidHeight, 0, 0, 0, 0, uis.whiteShader ); + trap_R_SetColor( NULL ); + } + + UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, hShader ); +} + +/* +================ UI_FillRect Coordinates are 640*480 virtual values @@ -1203,10 +1221,10 @@ { // draw the background if( uis.activemenu->showlogo ) { - UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackShader ); + UI_DrawPicFullScreen( uis.menuBackShader ); } else { - UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackNoLogoShader ); + UI_DrawPicFullScreen( uis.menuBackNoLogoShader ); } } Index: code/q3_ui/ui_local.h =================================================================== --- code/q3_ui/ui_local.h (revision 2013) +++ code/q3_ui/ui_local.h (working copy) @@ -564,6 +564,7 @@ extern float UI_ClampCvar( float min, float max, float value ); extern void UI_DrawNamedPic( float x, float y, float width, float height, const char *picname ); extern void UI_DrawHandlePic( float x, float y, float w, float h, qhandle_t hShader ); +extern void UI_DrawPicFullScreen(qhandle_t hShader); extern void UI_FillRect( float x, float y, float width, float height, const float *color ); extern void UI_DrawRect( float x, float y, float width, float height, const float *color ); extern void UI_UpdateScreen( void ); Index: code/q3_ui/ui_connect.c =================================================================== --- code/q3_ui/ui_connect.c (revision 2013) +++ code/q3_ui/ui_connect.c (working copy) @@ -169,7 +169,7 @@ if ( !overlay ) { // draw the dialog background UI_SetColor( color_white ); - UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackShader ); + UI_DrawPicFullScreen( uis.menuBackShader ); } // see what information we should display Index: code/q3_ui/ui_credits.c =================================================================== --- code/q3_ui/ui_credits.c (revision 2013) +++ code/q3_ui/ui_credits.c (working copy) @@ -166,12 +166,6 @@ =============== */ void UI_CreditMenu( void ) { - /* This UI_FillRect() hack will blank the borders if you're in widescreen, - so you get a completely black background instead of stripes from the - previous frame on each side of the credits.. */ - const float black[4] = { 0.0f, 0.0f, 0.0f, 1.0f }; - UI_FillRect(0 - uis.bias, 0, (640.0f / uis.xscale) * 2.0f, 480.0f / uis.yscale, black); - memset( &s_credits, 0 ,sizeof(s_credits) ); s_credits.menu.draw = UI_CreditMenu_Draw;