From caa9dffb2c7a5002a357bafa7a838a28e25aea94 Mon Sep 17 00:00:00 2001 From: TimeServ Date: Sat, 18 Apr 2009 23:29:03 +0000 Subject: [PATCH] fix sw screen render to act a bit more like gl git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3176 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/sw/sw_screen.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/engine/sw/sw_screen.c b/engine/sw/sw_screen.c index e000c4e2f..0e4255396 100644 --- a/engine/sw/sw_screen.c +++ b/engine/sw/sw_screen.c @@ -53,6 +53,7 @@ extern qbyte Trans(qbyte p, qbyte p2); void SWSCR_UpdateScreen (void) { qboolean nohud; + qboolean noworld; int uimenu; vrect_t vrect; @@ -126,7 +127,6 @@ void SWSCR_UpdateScreen (void) // D_EnableBackBufferAccess (); // of all overlay stuff if drawing directly - SCR_TileClear(); SCR_SetUpToDrawConsole (); SCR_EraseCenterString (); @@ -134,12 +134,13 @@ void SWSCR_UpdateScreen (void) // for linear writes all the time nohud = false; + noworld = false; #ifdef TEXTEDIT if (!editormodal) //don't render view. #endif { #ifdef CSQC_DAT - if (CSQC_DrawView()) + if (cls.state == ca_active && CSQC_DrawView()) nohud = true; else #endif @@ -150,10 +151,23 @@ void SWSCR_UpdateScreen (void) V_RenderView (); VID_UnlockBuffer (); } + else + noworld = true; } D_EnableBackBufferAccess (); // of all overlay stuff if drawing directly + if (noworld) + { + if ((key_dest == key_console || key_dest == key_game) && SCR_GetLoadingStage() == LS_NONE) + scr_con_current = vid.height; + + nohud = true; + Draw_ConsoleBackground(0, vid.height, true); + } + else if (!nohud) + SCR_TileClear(); + SCR_DrawTwoDimensional(uimenu, nohud); D_DisableBackBufferAccess (); // for adapters that can't stay mapped in