1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Removed joystick axis value negation.

This commit is contained in:
Camilla Berglund 2013-10-17 20:08:56 +02:00
parent d78510457c
commit e576bdc894
3 changed files with 4 additions and 11 deletions

View File

@ -210,6 +210,7 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/).
- Renamed configuration header to `glfw_config.h` to avoid conflicts
- Generated file `glfw3.pc` did not respect the LIB\_SUFFIX CMake option
- [Win32] Bugfix: Removed joystick axis value negation left over from GLFW 2
- [Win32] Bugfix: Restoring windows using the Win+D hot key did not trigger the
focus callback
- [Win32] Bugfix: The disabled cursor mode clip rectangle was updated for
@ -230,6 +231,7 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/).
- [Cocoa] Bugfix: The `install_name` field of the dynamic library was not set
- [Cocoa] Bugfix: Full screen windows were never reported as having focus
- [X11] Added setting of the `WM_CLASS` property to the initial window title
- [X11] Bugfix: Removed joystick axis value negation left over from GLFW 2
## Contact

View File

@ -97,7 +97,7 @@ const float* _glfwPlatformGetJoystickAxes(int joy, int* count)
return NULL;
axes[(*count)++] = calcJoystickPos(ji.dwXpos, jc.wXmin, jc.wXmax);
axes[(*count)++] = -calcJoystickPos(ji.dwYpos, jc.wYmin, jc.wYmax);
axes[(*count)++] = calcJoystickPos(ji.dwYpos, jc.wYmin, jc.wYmax);
if (jc.wCaps & JOYCAPS_HASZ)
axes[(*count)++] = calcJoystickPos(ji.dwZpos, jc.wZmin, jc.wZmax);
@ -109,7 +109,7 @@ const float* _glfwPlatformGetJoystickAxes(int joy, int* count)
axes[(*count)++] = calcJoystickPos(ji.dwUpos, jc.wUmin, jc.wUmax);
if (jc.wCaps & JOYCAPS_HASV)
axes[(*count)++] = -calcJoystickPos(ji.dwVpos, jc.wVmin, jc.wVmax);
axes[(*count)++] = calcJoystickPos(ji.dwVpos, jc.wVmin, jc.wVmax);
return axes;
}

View File

@ -125,15 +125,6 @@ static void pollJoystickEvents(void)
case JS_EVENT_AXIS:
_glfw.x11.joystick[i].axes[e.number] =
(float) e.value / 32767.0f;
// We need to change the sign for the Y axes, so that
// positive = up/forward, according to the GLFW spec.
if (e.number & 1)
{
_glfw.x11.joystick[i].axes[e.number] =
-_glfw.x11.joystick[i].axes[e.number];
}
break;
case JS_EVENT_BUTTON: