]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - in_win.c
check for -safe
[xonotic/darkplaces.git] / in_win.c
index 35e01381a0e64d5c8f7406ce85249e61e2bdb720..d11cd66ba1e742e99d43c877929b1d60e54d9d56 100644 (file)
--- a/in_win.c
+++ b/in_win.c
@@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "quakedef.h"
 #include "winquake.h"
-//#include "dosisms.h"
 
 #include <dinput.h>
 
@@ -377,7 +376,7 @@ IN_StartupMouse
 */
 void IN_StartupMouse (void)
 {
-       if ( COM_CheckParm ("-nomouse") 
+       if (COM_CheckParm ("-nomouse") || COM_CheckParm("-safe")
                return; 
 
        mouseinitialized = true;
@@ -472,7 +471,6 @@ IN_Shutdown
 */
 void IN_Shutdown (void)
 {
-//     usingmouse = false;
        IN_DeactivateMouse ();
        IN_ShowMouse ();
 
@@ -529,7 +527,7 @@ IN_MouseMove
 */
 void IN_MouseMove (usercmd_t *cmd)
 {
-       int                                     i, mx, my, mouselook = (in_mlook.state & 1) || freelook.integer;
+       int                                     i, mx, my;
        DIDEVICEOBJECTDATA      od;
        DWORD                           dwElements;
        HRESULT                         hr;
@@ -562,9 +560,7 @@ void IN_MouseMove (usercmd_t *cmd)
 
                        /* Unable to read data or no data available */
                        if (FAILED(hr) || dwElements == 0)
-                       {
                                break;
-                       }
 
                        /* Look at the element to see what happened */
 
@@ -643,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);
@@ -683,7 +679,6 @@ IN_ClearStates
 */
 void IN_ClearStates (void)
 {
-
        if (mouseactive)
        {
                mx_accum = 0;
@@ -703,12 +698,13 @@ void IN_StartupJoystick (void)
        int                     numdevs;
        JOYCAPS         jc;
        MMRESULT        mmr;
+       mmr = 0;
  
        // assume no joystick
        joy_avail = false; 
 
        // abort startup if user requests no joystick
-       if ( COM_CheckParm ("-nojoy") 
+       if (COM_CheckParm ("-nojoy") || COM_CheckParm("-safe")
                return; 
  
        // verify joystick driver is present
@@ -956,10 +952,8 @@ qboolean IN_ReadJoystick (void)
        else
        {
                // read error occurred
-               // turning off the joystick seems too harsh for 1 read error,\
+               // turning off the joystick seems too harsh for 1 read error,
                // but what should be done?
-               // Con_Printf ("IN_ReadJoystick: no response\n");
-               // joy_avail = false;
                return false;
        }
 }
@@ -1137,3 +1131,4 @@ void IN_JoyMove (usercmd_t *cmd)
                }
        }
 }
+