git-svn-id: https://svn.eduke32.com/eduke32@1016 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-08-24 06:06:04 +00:00
parent b58833d730
commit 57c3cea591

View file

@ -692,36 +692,41 @@ void CONTROL_PollDevices(ControlInfo *info)
void CONTROL_AxisFunctionState(int32 *p1) void CONTROL_AxisFunctionState(int32 *p1)
{ {
int32 i, j; if (CONTROL_NumMouseAxes)
i = CONTROL_NumMouseAxes-1;
do
{ {
if (!CONTROL_MouseAxes[i].digital) continue; int32 j, i = CONTROL_NumMouseAxes-1;
if (CONTROL_MouseAxes[i].digital < 0) do
j = CONTROL_MouseAxesMap[i].minmap; {
else if (!CONTROL_MouseAxes[i].digital) continue;
j = CONTROL_MouseAxesMap[i].maxmap;
if (j != AXISUNDEFINED) if (CONTROL_MouseAxes[i].digital < 0)
p1[j] = 1; j = CONTROL_MouseAxesMap[i].minmap;
} while (--i >= 0); else
j = CONTROL_MouseAxesMap[i].maxmap;
i = CONTROL_NumJoyAxes-1; if (j != AXISUNDEFINED)
p1[j] = 1;
} while (--i >= 0);
}
do if (CONTROL_NumJoyAxes)
{ {
if (!CONTROL_JoyAxes[i].digital) continue; int32 j, i = CONTROL_NumJoyAxes-1;
if (CONTROL_JoyAxes[i].digital < 0) do
j = CONTROL_JoyAxesMap[i].minmap; {
else if (!CONTROL_JoyAxes[i].digital) continue;
j = CONTROL_JoyAxesMap[i].maxmap;
if (j != AXISUNDEFINED) if (CONTROL_JoyAxes[i].digital < 0)
p1[j] = 1; j = CONTROL_JoyAxesMap[i].minmap;
} while (--i >= 0); else
j = CONTROL_JoyAxesMap[i].maxmap;
if (j != AXISUNDEFINED)
p1[j] = 1;
} while (--i >= 0);
}
} }
void CONTROL_ButtonFunctionState(int32 *p1) void CONTROL_ButtonFunctionState(int32 *p1)