Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Commit

Permalink
Fixed a c not c++ bug in glfw joystick code kludges.
Browse files Browse the repository at this point in the history
  • Loading branch information
blitz-research committed Oct 14, 2014
1 parent 70af2e7 commit f81c7fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions targets/glfw/template/glfw/lib/win32/win32_joystick.c
Expand Up @@ -227,14 +227,13 @@ int _glfwPlatformGetJoystickButtons( int joy, unsigned char *buttons,
}

if( (jc.wCaps & JOYCAPS_HASPOV) && button+3 < numbuttons ){
int i=-1;
int j=0,i=-1;
switch( ji.dwPOV ){
case JOY_POVLEFT:i=0;break;
case JOY_POVFORWARD:i=1;break;
case JOY_POVRIGHT:i=2;break;
case JOY_POVBACKWARD:i=3;break;
}
int j;
for( j=0;j<4;++j ){
buttons[button] = (j==i) ? GLFW_PRESS : GLFW_RELEASE;
button++;
Expand Down

0 comments on commit f81c7fb

Please sign in to comment.