]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
- Removed Con_SafePrint and Con_SafePrintf since they now does the same things as...
[xonotic/darkplaces.git] / vid_wgl.c
index 4649e67284753fc91795866b723cb82d3cb353b1..4726150ced845d16d9b6b7f2f2f4eecf03860949 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -259,7 +259,7 @@ static DIDATAFORMAT df = {
 // forward-referenced functions
 void IN_StartupJoystick (void);
 void Joy_AdvancedUpdate_f (void);
-void IN_JoyMove (usercmd_t *cmd);
+void IN_JoyMove (void);
 void IN_StartupMouse (void);
 
 /*
@@ -1177,7 +1177,7 @@ qboolean IN_InitDInput (void)
 
                if (hInstDI == NULL)
                {
-                       Con_SafePrint("Couldn't load dinput.dll\n");
+                       Con_Print("Couldn't load dinput.dll\n");
                        return false;
                }
        }
@@ -1188,7 +1188,7 @@ qboolean IN_InitDInput (void)
 
                if (!pDirectInputCreate)
                {
-                       Con_SafePrint("Couldn't get DI proc addr\n");
+                       Con_Print("Couldn't get DI proc addr\n");
                        return false;
                }
        }
@@ -1206,7 +1206,7 @@ qboolean IN_InitDInput (void)
 
        if (FAILED(hr))
        {
-               Con_SafePrint("Couldn't open DI mouse device\n");
+               Con_Print("Couldn't open DI mouse device\n");
                return false;
        }
 
@@ -1215,7 +1215,7 @@ qboolean IN_InitDInput (void)
 
        if (FAILED(hr))
        {
-               Con_SafePrint("Couldn't set DI mouse format\n");
+               Con_Print("Couldn't set DI mouse format\n");
                return false;
        }
 
@@ -1225,7 +1225,7 @@ qboolean IN_InitDInput (void)
 
        if (FAILED(hr))
        {
-               Con_SafePrint("Couldn't set DI coop level\n");
+               Con_Print("Couldn't set DI coop level\n");
                return false;
        }
 
@@ -1236,7 +1236,7 @@ qboolean IN_InitDInput (void)
 
        if (FAILED(hr))
        {
-               Con_SafePrint("Couldn't set DI buffersize\n");
+               Con_Print("Couldn't set DI buffersize\n");
                return false;
        }
 
@@ -1256,18 +1256,18 @@ void IN_StartupMouse (void)
 
        mouseinitialized = true;
 
-// COMMANDLINEOPTION: Windows Input: -nodinput disables DirectInput for mouse/joystick input, gl_finish 1 mode recommended if this option is used as otherwise it tends to stutter due to input backlog.
-       if (!COM_CheckParm ("-nodinput"))
+// COMMANDLINEOPTION: Windows Input: -dinput enables DirectInput for mouse/joystick input
+       if (COM_CheckParm ("-dinput"))
        {
                dinput = IN_InitDInput ();
 
                if (dinput)
                {
-                       Con_SafePrint("DirectInput initialized\n");
+                       Con_Print("DirectInput initialized\n");
                }
                else
                {
-                       Con_SafePrint("DirectInput not initialized\n");
+                       Con_Print("DirectInput not initialized\n");
                }
        }
 
@@ -1277,18 +1277,18 @@ void IN_StartupMouse (void)
 
                if (mouseparmsvalid)
                {
-// COMMANDLINEOPTION: Windows GDI Input: -noforcemspd disables setting of mouse speed (-nodinput only, windows only)
+// COMMANDLINEOPTION: Windows GDI Input: -noforcemspd disables setting of mouse speed (not used with -dinput, windows only)
                        if ( COM_CheckParm ("-noforcemspd") )
                                newmouseparms[2] = originalmouseparms[2];
 
-// COMMANDLINEOPTION: Windows GDI Input: -noforcemaccel disables setting of mouse acceleration (-nodinput only, windows only)
+// COMMANDLINEOPTION: Windows GDI Input: -noforcemaccel disables setting of mouse acceleration (not used with -dinput, windows only)
                        if ( COM_CheckParm ("-noforcemaccel") )
                        {
                                newmouseparms[0] = originalmouseparms[0];
                                newmouseparms[1] = originalmouseparms[1];
                        }
 
-// COMMANDLINEOPTION: Windows GDI Input: -noforcemparms disables setting of mouse parameters (-nodinput only, windows only)
+// COMMANDLINEOPTION: Windows GDI Input: -noforcemparms disables setting of mouse parameters (not used with -dinput, windows only)
                        if ( COM_CheckParm ("-noforcemparms") )
                        {
                                newmouseparms[0] = originalmouseparms[0];
@@ -1344,7 +1344,7 @@ void IN_MouseEvent (int mstate)
 IN_MouseMove
 ===========
 */
-void IN_MouseMove (usercmd_t *cmd)
+void IN_MouseMove (void)
 {
        int                                     i, mx, my;
        DIDEVICEOBJECTDATA      od;
@@ -1355,7 +1355,7 @@ void IN_MouseMove (usercmd_t *cmd)
        {
                GetCursorPos (&current_pos);
                //ui_mouseupdate(current_pos.x - window_x, current_pos.y - window_y);
-               IN_Mouse( cmd, 0, 0 );
+               IN_Mouse( 0, 0 );
                return;
        }
 
@@ -1442,7 +1442,7 @@ void IN_MouseMove (usercmd_t *cmd)
                my = current_pos.y - window_center_y;
        }
 
-       IN_Mouse(cmd, mx, my);
+       IN_Mouse(mx, my);
 
        // if the mouse has moved, force it to the center, so there's room to move
        if (!dinput && (mx || my))
@@ -1455,12 +1455,12 @@ void IN_MouseMove (usercmd_t *cmd)
 IN_Move
 ===========
 */
-void IN_Move (usercmd_t *cmd)
+void IN_Move (void)
 {
        if (vid_activewindow && !vid_hidden)
        {
-               IN_MouseMove (cmd);
-               IN_JoyMove (cmd);
+               IN_MouseMove ();
+               IN_JoyMove ();
        }
 }
 
@@ -1753,7 +1753,7 @@ qboolean IN_ReadJoystick (void)
 IN_JoyMove
 ===========
 */
-void IN_JoyMove (usercmd_t *cmd)
+void IN_JoyMove (void)
 {
        float   speed, aspeed;
        float   fAxisValue, fTemp;
@@ -1848,7 +1848,7 @@ void IN_JoyMove (usercmd_t *cmd)
                                // user wants forward control to be forward control
                                if (fabs(fAxisValue) > joy_forwardthreshold.value)
                                {
-                                       cmd->forwardmove += (fAxisValue * joy_forwardsensitivity.value) * speed * cl_forwardspeed.value;
+                                       cl.cmd.forwardmove += (fAxisValue * joy_forwardsensitivity.value) * speed * cl_forwardspeed.value;
                                }
                        }
                        break;
@@ -1856,7 +1856,7 @@ void IN_JoyMove (usercmd_t *cmd)
                case AxisSide:
                        if (fabs(fAxisValue) > joy_sidethreshold.value)
                        {
-                               cmd->sidemove += (fAxisValue * joy_sidesensitivity.value) * speed * cl_sidespeed.value;
+                               cl.cmd.sidemove += (fAxisValue * joy_sidesensitivity.value) * speed * cl_sidespeed.value;
                        }
                        break;
 
@@ -1866,7 +1866,7 @@ void IN_JoyMove (usercmd_t *cmd)
                                // user wants turn control to become side control
                                if (fabs(fAxisValue) > joy_sidethreshold.value)
                                {
-                                       cmd->sidemove -= (fAxisValue * joy_sidesensitivity.value) * speed * cl_sidespeed.value;
+                                       cl.cmd.sidemove -= (fAxisValue * joy_sidesensitivity.value) * speed * cl_sidespeed.value;
                                }
                        }
                        else