r1285 - trunk/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Mar 26 23:18:32 EDT 2008


Author: thilo
Date: 2008-03-26 23:18:32 -0400 (Wed, 26 Mar 2008)
New Revision: 1285

Modified:
   trunk/code/client/cl_main.c
   trunk/code/client/cl_scrn.c
Log:
A more clean solution to this bug. Stop the renderer when the UI VM is not running, as no commands get issued in that case anyways.


Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c	2008-03-27 03:00:49 UTC (rev 1284)
+++ trunk/code/client/cl_main.c	2008-03-27 03:18:32 UTC (rev 1285)
@@ -778,11 +778,7 @@
 		Q_strncpyz( cls.servername, "localhost", sizeof(cls.servername) );
 		cls.state = CA_CHALLENGING;		// so the connect screen is drawn
 		Key_SetCatcher( 0 );
-		/* Execute next line twice, so that the connect image gets written into both, front- and
-		 * back buffer. This is necessary to prevent a flashing screen on map startup, as the UI gets
-		 * killed for a short time and cannot update the screen. */
 		SCR_UpdateScreen();
-		SCR_UpdateScreen();
 		clc.connectTime = -RETRANSMIT_TIMEOUT;
 		NET_StringToAdr( cls.servername, &clc.serverAddress);
 		// we don't need a challenge on the localhost

Modified: trunk/code/client/cl_scrn.c
===================================================================
--- trunk/code/client/cl_scrn.c	2008-03-27 03:00:49 UTC (rev 1284)
+++ trunk/code/client/cl_scrn.c	2008-03-27 03:18:32 UTC (rev 1285)
@@ -523,20 +523,25 @@
 	}
 	recursive = 1;
 
-	// if running in stereo, we need to draw the frame twice
-	if ( cls.glconfig.stereoEnabled ) {
-		SCR_DrawScreenField( STEREO_LEFT );
-		SCR_DrawScreenField( STEREO_RIGHT );
-	} else {
-		SCR_DrawScreenField( STEREO_CENTER );
-	}
+	/* If there is no VM, there are also no rendering commands issued. Stop the renderer in
+	 * that case. */
+	if(uivm)
+	{
+		// if running in stereo, we need to draw the frame twice
+		if ( cls.glconfig.stereoEnabled ) {
+			SCR_DrawScreenField( STEREO_LEFT );
+			SCR_DrawScreenField( STEREO_RIGHT );
+		} else {
+			SCR_DrawScreenField( STEREO_CENTER );
+		}
 
-	if ( com_speeds->integer ) {
-		re.EndFrame( &time_frontend, &time_backend );
-	} else {
-		re.EndFrame( NULL, NULL );
+		if ( com_speeds->integer ) {
+			re.EndFrame( &time_frontend, &time_backend );
+		} else {
+			re.EndFrame( NULL, NULL );
+		}
 	}
-
+	
 	recursive = 0;
 }
 




More information about the quake3-commits mailing list