Remove errors for gamepad element mismatch
Because there are controllers in the wild using the same hardware ID despite having different numbers of buttons and axes, an error message was triggered that was only expected for a corrupted mapping database. This removes the error for now, in preparation for better error handling for gamepad mappings overall. Fixes #1763.
This commit is contained in:
parent
52d8347d34
commit
6876cf8d7e
@ -141,6 +141,8 @@ information on what to include when reporting a bug.
|
|||||||
- Bugfix: Some extension loader headers did not prevent default OpenGL header
|
- Bugfix: Some extension loader headers did not prevent default OpenGL header
|
||||||
inclusion (#1695)
|
inclusion (#1695)
|
||||||
- Bugfix: Buffers were swapped at creation on single-buffered windows (#1873)
|
- Bugfix: Buffers were swapped at creation on single-buffered windows (#1873)
|
||||||
|
- Bugfix: Gamepad mapping updates could spam `GLFW_INVALID_VALUE` due to
|
||||||
|
incompatible controllers sharing hardware ID (#1763)
|
||||||
- [Win32] Added the `GLFW_WIN32_KEYBOARD_MENU` window hint for enabling access
|
- [Win32] Added the `GLFW_WIN32_KEYBOARD_MENU` window hint for enabling access
|
||||||
to the window menu
|
to the window menu
|
||||||
- [Win32] Added a version info resource to the GLFW DLL
|
- [Win32] Added a version info resource to the GLFW DLL
|
||||||
|
12
src/input.c
12
src/input.c
@ -101,25 +101,13 @@ static _GLFWmapping* findValidMapping(const _GLFWjoystick* js)
|
|||||||
for (i = 0; i <= GLFW_GAMEPAD_BUTTON_LAST; i++)
|
for (i = 0; i <= GLFW_GAMEPAD_BUTTON_LAST; i++)
|
||||||
{
|
{
|
||||||
if (!isValidElementForJoystick(mapping->buttons + i, js))
|
if (!isValidElementForJoystick(mapping->buttons + i, js))
|
||||||
{
|
|
||||||
_glfwInputError(GLFW_INVALID_VALUE,
|
|
||||||
"Invalid button in gamepad mapping %s (%s)",
|
|
||||||
mapping->guid,
|
|
||||||
mapping->name);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i <= GLFW_GAMEPAD_AXIS_LAST; i++)
|
for (i = 0; i <= GLFW_GAMEPAD_AXIS_LAST; i++)
|
||||||
{
|
{
|
||||||
if (!isValidElementForJoystick(mapping->axes + i, js))
|
if (!isValidElementForJoystick(mapping->axes + i, js))
|
||||||
{
|
|
||||||
_glfwInputError(GLFW_INVALID_VALUE,
|
|
||||||
"Invalid axis in gamepad mapping %s (%s)",
|
|
||||||
mapping->guid,
|
|
||||||
mapping->name);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user