Disable GLFW hats in <3.3
Doesn't exist - causes Travis to fail
This commit is contained in:
parent
ee1e7aed11
commit
b6398c58b4
1 changed files with 4 additions and 0 deletions
|
@ -102,8 +102,10 @@ BOOL ControllerBackend_GetJoystickStatus(JOYSTICK_STATUS *status)
|
||||||
int total_axes;
|
int total_axes;
|
||||||
const float *axes = glfwGetJoystickAxes(connected_joystick_id, &total_axes);
|
const float *axes = glfwGetJoystickAxes(connected_joystick_id, &total_axes);
|
||||||
|
|
||||||
|
#if GLFW_VERSION_MAJOR > 3 || (GLFW_VERSION_MAJOR == 3 && GLFW_VERSION_MINOR >= 3)
|
||||||
int total_hats;
|
int total_hats;
|
||||||
const unsigned char *hats = glfwGetJoystickHats(connected_joystick_id, &total_hats);
|
const unsigned char *hats = glfwGetJoystickHats(connected_joystick_id, &total_hats);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Handle directional inputs
|
// Handle directional inputs
|
||||||
status->bLeft = axes[0] < axis_neutrals[0] - DEADZONE;
|
status->bLeft = axes[0] < axis_neutrals[0] - DEADZONE;
|
||||||
|
@ -137,6 +139,7 @@ BOOL ControllerBackend_GetJoystickStatus(JOYSTICK_STATUS *status)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GLFW_VERSION_MAJOR > 3 || (GLFW_VERSION_MAJOR == 3 && GLFW_VERSION_MINOR >= 3)
|
||||||
// Then the joystick hats
|
// Then the joystick hats
|
||||||
for (int i = 0; i < total_axes; ++i)
|
for (int i = 0; i < total_axes; ++i)
|
||||||
{
|
{
|
||||||
|
@ -160,6 +163,7 @@ BOOL ControllerBackend_GetJoystickStatus(JOYSTICK_STATUS *status)
|
||||||
if (++buttons_done >= button_limit)
|
if (++buttons_done >= button_limit)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Blank any remaining buttons
|
// Blank any remaining buttons
|
||||||
for (size_t i = buttons_done; i < button_limit; ++i)
|
for (size_t i = buttons_done; i < button_limit; ++i)
|
||||||
|
|
Loading…
Add table
Reference in a new issue