mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 14:24:35 +00:00
Removed joystick axis value negation.
This commit is contained in:
parent
d78510457c
commit
e576bdc894
@ -210,6 +210,7 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/).
|
|||||||
|
|
||||||
- Renamed configuration header to `glfw_config.h` to avoid conflicts
|
- Renamed configuration header to `glfw_config.h` to avoid conflicts
|
||||||
- Generated file `glfw3.pc` did not respect the LIB\_SUFFIX CMake option
|
- 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
|
- [Win32] Bugfix: Restoring windows using the Win+D hot key did not trigger the
|
||||||
focus callback
|
focus callback
|
||||||
- [Win32] Bugfix: The disabled cursor mode clip rectangle was updated for
|
- [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: The `install_name` field of the dynamic library was not set
|
||||||
- [Cocoa] Bugfix: Full screen windows were never reported as having focus
|
- [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] 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
|
## Contact
|
||||||
|
@ -97,7 +97,7 @@ const float* _glfwPlatformGetJoystickAxes(int joy, int* count)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
axes[(*count)++] = calcJoystickPos(ji.dwXpos, jc.wXmin, jc.wXmax);
|
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)
|
if (jc.wCaps & JOYCAPS_HASZ)
|
||||||
axes[(*count)++] = calcJoystickPos(ji.dwZpos, jc.wZmin, jc.wZmax);
|
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);
|
axes[(*count)++] = calcJoystickPos(ji.dwUpos, jc.wUmin, jc.wUmax);
|
||||||
|
|
||||||
if (jc.wCaps & JOYCAPS_HASV)
|
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;
|
return axes;
|
||||||
}
|
}
|
||||||
|
@ -125,15 +125,6 @@ static void pollJoystickEvents(void)
|
|||||||
case JS_EVENT_AXIS:
|
case JS_EVENT_AXIS:
|
||||||
_glfw.x11.joystick[i].axes[e.number] =
|
_glfw.x11.joystick[i].axes[e.number] =
|
||||||
(float) e.value / 32767.0f;
|
(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;
|
break;
|
||||||
|
|
||||||
case JS_EVENT_BUTTON:
|
case JS_EVENT_BUTTON:
|
||||||
|
Loading…
Reference in New Issue
Block a user