# Can't get trigger inputs from specifik joystick!

**URL:** <https://discourse.glfw.org/t/cant-get-trigger-inputs-from-specifik-joystick/836>\
**Category:** support\
**Created:** [January 20, 2017, 1:58pm UTC](https://discourse.glfw.org/t/cant-get-trigger-inputs-from-specifik-joystick/836 "2017-01-20T13:58:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olverine](https://avatars.discourse-cdn.com/v4/letter/o/fbc32d/32.png) [@Olverine](https://discourse.glfw.org/u/Olverine)\
**Post date:** [January 20, 2017, 1:58pm UTC](https://discourse.glfw.org/t/cant-get-trigger-inputs-from-specifik-joystick/836/1 "2017-01-20T13:58:33Z")

</div>

So, I’m developing a split screen game using OpenGL. So obviously, I need to be able to get inputs from different controllers. right now I do it like this:

```
// Get joystick input values
int count;
const float *axes = glfwGetJoystickAxes(joystick, &count);
const unsigned char *buttons = glfwGetJoystickButtons(joystick, &count);

```

the joystick variable is ofcourse which controller this player is using. Player one uses GLFW\_JOYSTICK\_1 and player 2 uses GLFW\_JOYSTICK\_2.  
Then I use the values like this:

```
// Get throttle input from right trigger
if (joystickPresent)
	throttleInput += (axes[5] + 1) / 2; // Convert input from -1.0 - 1.0 to 0.0 - 1.0

```

this works great for the joysticks on the controllers but when I press one of the triggers, both players receive the input. Does anyone know why this happens and how to fix it?  
I should probably also mention that I use xbox 360 controllers.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [January 20, 2017, 2:35pm UTC](https://discourse.glfw.org/t/cant-get-trigger-inputs-from-specifik-joystick/836/2 "2017-01-20T14:35:13Z")

</div>

This is difficult to debug for you without seeing more of the code.

If you think that GLFW has an issue, first try running the [joysticks.c](https://github.com/glfw/glfw/blob/master/tests/joysticks.c) test (which can be built from source using cmake).
