]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
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 37db2e0f7645e303b63aca6ea3727b6cf3565150..60eb8a83e0bc0a067390274005af1d0ebc2f5a04 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 cc3b58be14335697be35ca22bf60a3001a854de9..dee6bc51c618064dde845be98bc64287948415c3 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 4979397a3daacf3410be3747e01361bef230f29e..9251b84b44116b5b31e2710f561d7c5e95280a43 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 72e0652ff7a256d4de81e6ebe61008d5bafdcd76..fead9350e865626adae1dd0815cde4620b7715de 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);