]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - in_win.c
check for -safe
[xonotic/darkplaces.git] / in_win.c
index 04cdbcdcf0e5c934516d026db598074561597809..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 ();
 
@@ -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;
@@ -709,7 +704,7 @@ void IN_StartupJoystick (void)
        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
@@ -959,8 +954,6 @@ qboolean IN_ReadJoystick (void)
                // read error occurred
                // 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;
        }
 }
@@ -1138,3 +1131,4 @@ void IN_JoyMove (usercmd_t *cmd)
                }
        }
 }
+