From 6642686e33e9c7bb7d251d0dc774b2ce7288e3ed Mon Sep 17 00:00:00 2001 From: Chris Ison Date: Sun, 15 Feb 2004 03:40:50 +0000 Subject: [PATCH] removal of legacy MGL block_drawing variable. Fixed window restore bug that prevented the screen from being updated. --- include/QF/screen.h | 2 -- include/r_screen.h | 2 -- libs/video/renderer/gl/gl_screen.c | 2 +- libs/video/renderer/r_screen.c | 2 -- libs/video/renderer/sw/screen.c | 2 +- libs/video/renderer/sw32/screen.c | 2 +- libs/video/targets/in_win.c | 2 ++ libs/video/targets/vid_wgl.c | 2 +- nq/source/sys_win.c | 3 +-- qw/source/cl_sys_win.c | 2 +- 10 files changed, 8 insertions(+), 13 deletions(-) diff --git a/include/QF/screen.h b/include/QF/screen.h index e3e12db97..7a1e7601f 100644 --- a/include/QF/screen.h +++ b/include/QF/screen.h @@ -80,8 +80,6 @@ extern struct cvar_s *scr_viewsize; extern int scr_copytop; extern int scr_copyeverything; -extern qboolean block_drawing; - extern struct qpic_s *scr_ram; extern struct qpic_s *scr_net; extern struct qpic_s *scr_turtle; diff --git a/include/r_screen.h b/include/r_screen.h index 204e8f748..68998ad7a 100644 --- a/include/r_screen.h +++ b/include/r_screen.h @@ -62,8 +62,6 @@ extern vrect_t scr_vrect; extern qboolean scr_skipupdate; -extern qboolean block_drawing; - /* CENTER PRINTING */ extern char scr_centerstring[1024]; diff --git a/libs/video/renderer/gl/gl_screen.c b/libs/video/renderer/gl/gl_screen.c index dd62949f3..41a744141 100644 --- a/libs/video/renderer/gl/gl_screen.c +++ b/libs/video/renderer/gl/gl_screen.c @@ -194,7 +194,7 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs) double time1 = 0, time2; static int begun = 0; - if (block_drawing) + if (scr_skipupdate) return; if (begun) diff --git a/libs/video/renderer/r_screen.c b/libs/video/renderer/r_screen.c index 6b36cfbeb..1d620b2b8 100644 --- a/libs/video/renderer/r_screen.c +++ b/libs/video/renderer/r_screen.c @@ -120,8 +120,6 @@ vrect_t scr_vrect; qboolean scr_skipupdate; -qboolean block_drawing; - /* CENTER PRINTING */ char scr_centerstring[1024]; float scr_centertime_start; // for slow victory printing diff --git a/libs/video/renderer/sw/screen.c b/libs/video/renderer/sw/screen.c index 62c9cefaf..f8f15be45 100644 --- a/libs/video/renderer/sw/screen.c +++ b/libs/video/renderer/sw/screen.c @@ -197,7 +197,7 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs) { vrect_t vrect; - if (scr_skipupdate || block_drawing) + if (scr_skipupdate) return; r_realtime = realtime; diff --git a/libs/video/renderer/sw32/screen.c b/libs/video/renderer/sw32/screen.c index 6e4cda93b..7dbcd553a 100644 --- a/libs/video/renderer/sw32/screen.c +++ b/libs/video/renderer/sw32/screen.c @@ -218,7 +218,7 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs) { vrect_t vrect; - if (scr_skipupdate || block_drawing) + if (scr_skipupdate) return; r_realtime = realtime; diff --git a/libs/video/targets/in_win.c b/libs/video/targets/in_win.c index 00d86d3d6..27d24468d 100644 --- a/libs/video/targets/in_win.c +++ b/libs/video/targets/in_win.c @@ -46,6 +46,7 @@ static __attribute__ ((unused)) const char rcsid[] = #include "QF/input.h" #include "QF/keys.h" #include "QF/qargs.h" +#include "QF/screen.h" #include "QF/sys.h" #include "compat.h" @@ -434,6 +435,7 @@ IN_LL_ProcessEvents (void) HRESULT hr; while (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) { + scr_skipupdate = 0; if (!GetMessage (&msg, NULL, 0, 0)) Sys_Quit (); TranslateMessage (&msg); diff --git a/libs/video/targets/vid_wgl.c b/libs/video/targets/vid_wgl.c index 4a01f86a0..a67c54485 100644 --- a/libs/video/targets/vid_wgl.c +++ b/libs/video/targets/vid_wgl.c @@ -349,7 +349,7 @@ GL_Init (void) void GL_EndRendering (void) { - if (!scr_skipupdate || block_drawing) { + if (!scr_skipupdate) { qfglFinish (); SwapBuffers (maindc); } diff --git a/nq/source/sys_win.c b/nq/source/sys_win.c index 9842ef150..ea473f7eb 100644 --- a/nq/source/sys_win.c +++ b/nq/source/sys_win.c @@ -232,8 +232,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, } else { // yield the CPU for a little while when paused, minimized, or // not the focus - if ((cl.paused && !ActiveApp) || Minimized - || block_drawing) { + if ((cl.paused && !ActiveApp) || Minimized) { SleepUntilInput (PAUSE_SLEEP); scr_skipupdate = 1; // no point in bothering to draw } else if (!ActiveApp) { diff --git a/qw/source/cl_sys_win.c b/qw/source/cl_sys_win.c index 8dbf7e1cc..5c63ad5f7 100644 --- a/qw/source/cl_sys_win.c +++ b/qw/source/cl_sys_win.c @@ -223,7 +223,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, // main window message loop while (1) { // 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); scr_skipupdate = 1; // no point in bothering to draw } else if (!ActiveApp) {