]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
removed some windows cruft (like scr_skipupdate, and the SleepUntilInput stuff)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 25 Nov 2004 20:41:29 +0000 (20:41 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 25 Nov 2004 20:41:29 +0000 (20:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4795 d7cf8633-e32d-0410-b094-e92efae38249

screen.h
sys_win.c
vid_wgl.c

index e21f4563f276f73dacd2f55fbf065bef9fa0cfb8..bb7ba5b90c7a8a594a8650591b07533a6ecdc29b 100644 (file)
--- a/screen.h
+++ b/screen.h
@@ -33,9 +33,6 @@ extern float scr_conlines; // lines of console to display
 
 extern int sb_lines;
 
-extern qboolean        scr_disabled_for_loading;
-extern qboolean        scr_skipupdate;
-
 extern cvar_t scr_viewsize;
 extern cvar_t scr_fov;
 extern cvar_t showfps;
index c2892da98a24ef55e0994f3197728190ac781840..36ab6e59efef73a816815bf92803ee93bc75e97e 100644 (file)
--- a/sys_win.c
+++ b/sys_win.c
@@ -31,14 +31,6 @@ extern void S_BlockSound (void);
 
 cvar_t sys_usetimegettime = {CVAR_SAVE, "sys_usetimegettime", "1"};
 
-// # of seconds to wait on Sys_Error running dedicated before exiting
-#define CONSOLE_ERROR_TIMEOUT  60.0
-// sleep time on pause or minimization
-#define PAUSE_SLEEP            50
-// sleep time when not focus
-#define NOT_FOCUS_SLEEP        20
-
-static qboolean                sc_return_on_enter = false;
 HANDLE                         hinput, houtput;
 
 static HANDLE  tevent;
@@ -55,8 +47,6 @@ SYSTEM IO
 ===============================================================================
 */
 
-void SleepUntilInput (int time);
-
 void Sys_Error (const char *error, ...)
 {
        va_list         argptr;
@@ -242,13 +232,6 @@ char *Sys_ConsoleInput (void)
                                                        len = 0;
                                                        return text;
                                                }
-                                               else if (sc_return_on_enter)
-                                               {
-                                               // special case to allow exiting from the error handler on Enter
-                                                       text[0] = '\r';
-                                                       len = 0;
-                                                       return text;
-                                               }
 
                                                break;
 
@@ -317,12 +300,6 @@ WINDOWS CRAP
 */
 
 
-void SleepUntilInput (int time)
-{
-       MsgWaitForMultipleObjects(1, &tevent, false, time, QS_ALLINPUT);
-}
-
-
 /*
 ==================
 WinMain
@@ -441,18 +418,6 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
        /* main window message loop */
        while (1)
        {
-               if (cls.state != ca_dedicated)
-               {
-               // yield the CPU for a little while when paused, minimized, or not the focus
-                       if ((cl.paused && !vid_activewindow) || vid_hidden)
-                       {
-                               SleepUntilInput (PAUSE_SLEEP);
-                               scr_skipupdate = 1;             // no point in bothering to draw
-                       }
-                       else if (!vid_activewindow)
-                               SleepUntilInput (NOT_FOCUS_SLEEP);
-               }
-
                framenewtime = Sys_DoubleTime ();
                Host_Frame (framenewtime - frameoldtime);
                frameoldtime = framenewtime;
index af3475f79decdcd3942264db43ede83463dcbdcc..4649e67284753fc91795866b723cb82d3cb353b1 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -73,8 +73,6 @@ static dllfunction_t wglswapintervalfuncs[] =
        {NULL, NULL}
 };
 
-qboolean scr_skipupdate;
-
 static DEVMODE gdevmode;
 static qboolean vid_initialized = false;
 static qboolean vid_wassuspended = false;
@@ -315,7 +313,7 @@ void VID_Finish (void)
                        qwglSwapIntervalEXT (old_vsync);
        }
 
-       if (r_render.integer && !scr_skipupdate)
+       if (r_render.integer && !vid_hidden)
        {
                if (r_speeds.integer || gl_finish.integer)
                        qglFinish();
@@ -523,9 +521,6 @@ void Sys_SendKeyEvents (void)
 
        while (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE))
        {
-       // we always update if there are any event, even if we're paused
-               scr_skipupdate = 0;
-
                if (!GetMessage (&msg, NULL, 0, 0))
                        Sys_Quit ();