removal of legacy MGL block_drawing variable. Fixed window restore bug that prevented the screen from being updated.

This commit is contained in:
Chris Ison 2004-02-15 03:40:50 +00:00
parent fef9b30bd7
commit 6642686e33
10 changed files with 8 additions and 13 deletions

View file

@ -80,8 +80,6 @@ extern struct cvar_s *scr_viewsize;
extern int scr_copytop; extern int scr_copytop;
extern int scr_copyeverything; extern int scr_copyeverything;
extern qboolean block_drawing;
extern struct qpic_s *scr_ram; extern struct qpic_s *scr_ram;
extern struct qpic_s *scr_net; extern struct qpic_s *scr_net;
extern struct qpic_s *scr_turtle; extern struct qpic_s *scr_turtle;

View file

@ -62,8 +62,6 @@ extern vrect_t scr_vrect;
extern qboolean scr_skipupdate; extern qboolean scr_skipupdate;
extern qboolean block_drawing;
/* CENTER PRINTING */ /* CENTER PRINTING */
extern char scr_centerstring[1024]; extern char scr_centerstring[1024];

View file

@ -194,7 +194,7 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs)
double time1 = 0, time2; double time1 = 0, time2;
static int begun = 0; static int begun = 0;
if (block_drawing) if (scr_skipupdate)
return; return;
if (begun) if (begun)

View file

@ -120,8 +120,6 @@ vrect_t scr_vrect;
qboolean scr_skipupdate; qboolean scr_skipupdate;
qboolean block_drawing;
/* CENTER PRINTING */ /* CENTER PRINTING */
char scr_centerstring[1024]; char scr_centerstring[1024];
float scr_centertime_start; // for slow victory printing float scr_centertime_start; // for slow victory printing

View file

@ -197,7 +197,7 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs)
{ {
vrect_t vrect; vrect_t vrect;
if (scr_skipupdate || block_drawing) if (scr_skipupdate)
return; return;
r_realtime = realtime; r_realtime = realtime;

View file

@ -218,7 +218,7 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs)
{ {
vrect_t vrect; vrect_t vrect;
if (scr_skipupdate || block_drawing) if (scr_skipupdate)
return; return;
r_realtime = realtime; r_realtime = realtime;

View file

@ -46,6 +46,7 @@ static __attribute__ ((unused)) const char rcsid[] =
#include "QF/input.h" #include "QF/input.h"
#include "QF/keys.h" #include "QF/keys.h"
#include "QF/qargs.h" #include "QF/qargs.h"
#include "QF/screen.h"
#include "QF/sys.h" #include "QF/sys.h"
#include "compat.h" #include "compat.h"
@ -434,6 +435,7 @@ IN_LL_ProcessEvents (void)
HRESULT hr; HRESULT hr;
while (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) { while (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) {
scr_skipupdate = 0;
if (!GetMessage (&msg, NULL, 0, 0)) if (!GetMessage (&msg, NULL, 0, 0))
Sys_Quit (); Sys_Quit ();
TranslateMessage (&msg); TranslateMessage (&msg);

View file

@ -349,7 +349,7 @@ GL_Init (void)
void void
GL_EndRendering (void) GL_EndRendering (void)
{ {
if (!scr_skipupdate || block_drawing) { if (!scr_skipupdate) {
qfglFinish (); qfglFinish ();
SwapBuffers (maindc); SwapBuffers (maindc);
} }

View file

@ -232,8 +232,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
} else { } else {
// yield the CPU for a little while when paused, minimized, or // yield the CPU for a little while when paused, minimized, or
// not the focus // not the focus
if ((cl.paused && !ActiveApp) || Minimized if ((cl.paused && !ActiveApp) || Minimized) {
|| block_drawing) {
SleepUntilInput (PAUSE_SLEEP); SleepUntilInput (PAUSE_SLEEP);
scr_skipupdate = 1; // no point in bothering to draw scr_skipupdate = 1; // no point in bothering to draw
} else if (!ActiveApp) { } else if (!ActiveApp) {

View file

@ -223,7 +223,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
// main window message loop // main window message loop
while (1) { while (1) {
// yield CPU for a little bit when paused, minimized, or not the focus // yield CPU for a little bit when paused, minimized, or not the focus
if ((cl.paused && (!ActiveApp)) || Minimized || block_drawing) { if ((cl.paused && (!ActiveApp)) || Minimized) {
SleepUntilInput (PAUSE_SLEEP); SleepUntilInput (PAUSE_SLEEP);
scr_skipupdate = 1; // no point in bothering to draw scr_skipupdate = 1; // no point in bothering to draw
} else if (!ActiveApp) { } else if (!ActiveApp) {