fix mouse in win32, I had forgotten to update a lot of code
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 4 Aug 2002 19:37:09 +0000 (19:37 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 4 Aug 2002 19:37:09 +0000 (19:37 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2192 d7cf8633-e32d-0410-b094-e92efae38249

in_win.c
sys_win.c
vid_wgl.c
winquake.h

index 37db2e0..60eb8a8 100644 (file)
--- a/in_win.c
+++ b/in_win.c
@@ -639,7 +639,7 @@ IN_Move
 */
 void IN_Move (usercmd_t *cmd)
 {
-       if (ActiveApp && !Minimized)
+       if (vid_activewindow && !vid_hidden)
        {
                IN_MouseMove (cmd);
                IN_JoyMove (cmd);
index cc3b58b..dee6bc5 100644 (file)
--- a/sys_win.c
+++ b/sys_win.c
@@ -36,7 +36,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #define NOT_FOCUS_SLEEP        20
 
 int                    starttime;
-qboolean       ActiveApp, Minimized;
 
 static qboolean                sc_return_on_enter = false;
 HANDLE                         hinput, houtput;
@@ -576,12 +575,12 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
                if (cls.state != ca_dedicated)
                {
                // yield the CPU for a little while when paused, minimized, or not the focus
-                       if ((cl.paused && !ActiveApp) || Minimized)
+                       if ((cl.paused && !vid_activewindow) || vid_hidden)
                        {
                                SleepUntilInput (PAUSE_SLEEP);
                                scr_skipupdate = 1;             // no point in bothering to draw
                        }
-                       else if (!ActiveApp)
+                       else if (!vid_activewindow)
                                SleepUntilInput (NOT_FOCUS_SLEEP);
                }
 
index 4979397..9251b84 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -539,7 +539,7 @@ void AppActivate(BOOL fActive, BOOL minimize)
        static BOOL     sound_active;
 
        vid_activewindow = fActive;
-       Minimized = minimize;
+       vid_hidden = minimize;
 
 // enable/disable sound on focus gain/loss
        if (!vid_activewindow && sound_active)
index 72e0652..fead935 100644 (file)
@@ -58,7 +58,6 @@ typedef enum {MS_WINDOWED, MS_FULLSCREEN, MS_FULLDIB, MS_UNINIT} modestate_t;
 extern modestate_t     modestate;
 
 extern HWND                    mainwindow;
-extern qboolean                ActiveApp, Minimized;
 
 void IN_ShowMouse (void);
 void IN_DeactivateMouse (void);