Skip to content

Commit

Permalink
fix crash introduced by parallel port support
Browse files Browse the repository at this point in the history
  • Loading branch information
rsn8887 committed Apr 22, 2018
1 parent 3765a11 commit 1638c44
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/od-joy.cpp
Expand Up @@ -621,7 +621,7 @@ void read_joystick(int nr, unsigned int *dir, int *button)
else if (dpadDown[joynum])
bot = 1;
if (
(mainMenu_autofire & switch_autofire & delay2[joynum]>mainMenu_autofireRate)
(mainMenu_autofire & switch_autofire & delay2[joynum-1]>mainMenu_autofireRate)
||
(
(
Expand All @@ -631,13 +631,13 @@ void read_joystick(int nr, unsigned int *dir, int *button)
||
(mainMenu_autofireButton1==GP2X_BUTTON_Y && buttonY[joynum])
)
& delay2[joynum]>mainMenu_autofireRate
& delay2[joynum-1]>mainMenu_autofireRate
)
)
{
if(!buttonB[joynum])
*button=1;
delay2[joynum]=0;
delay2[joynum-1]=0;
*button |= (buttonB[joynum] & 1) << 1;
}
else
Expand All @@ -646,7 +646,7 @@ void read_joystick(int nr, unsigned int *dir, int *button)
*button |= 0x01;
if (buttonB[joynum])
*button |= (0x01 << 1);
delay2[joynum]++;
delay2[joynum-1]++;
}
}
#endif //__PSP2__
Expand Down

0 comments on commit 1638c44

Please sign in to comment.