mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- Don't loop through all joystick axes and zero them in I_GetAxes()
.
* The caller should be passing a 0-init'd array through.
This commit is contained in:
parent
133c8fa80b
commit
23bff9f701
3 changed files with 1 additions and 16 deletions
|
@ -1202,11 +1202,6 @@ void I_GetJoysticks(TArray<IJoystickConfig*>& sticks)
|
|||
|
||||
void I_GetAxes(float axes[NUM_JOYAXIS])
|
||||
{
|
||||
for (size_t i = 0; i < NUM_JOYAXIS; ++i)
|
||||
{
|
||||
axes[i] = 0.0f;
|
||||
}
|
||||
|
||||
if (use_joystick && NULL != s_joystickManager)
|
||||
{
|
||||
s_joystickManager->AddAxes(axes);
|
||||
|
|
|
@ -324,10 +324,6 @@ void I_GetJoysticks(TArray<IJoystickConfig *> &sticks)
|
|||
|
||||
void I_GetAxes(float axes[NUM_JOYAXIS])
|
||||
{
|
||||
for (int i = 0; i < NUM_JOYAXIS; ++i)
|
||||
{
|
||||
axes[i] = 0;
|
||||
}
|
||||
if (use_joystick && JoystickManager)
|
||||
{
|
||||
JoystickManager->AddAxes(axes);
|
||||
|
|
|
@ -635,15 +635,9 @@ void I_StartFrame ()
|
|||
|
||||
void I_GetAxes(float axes[NUM_JOYAXIS])
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NUM_JOYAXIS; ++i)
|
||||
{
|
||||
axes[i] = 0;
|
||||
}
|
||||
if (use_joystick)
|
||||
{
|
||||
for (i = 0; i < NUM_JOYDEVICES; ++i)
|
||||
for (unsigned i = 0; i < NUM_JOYDEVICES; ++i)
|
||||
{
|
||||
if (JoyDevices[i] != NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue