Fix return value on error for glfwGetKeyScancode

The documentation says it should be -1, not zero.

(cherry picked from commit 8c5471d6cd)
This commit is contained in:
Camilla Löwy
2023-12-01 13:22:11 +01:00
parent 2a4e26870b
commit 11f517e557
2 changed files with 2 additions and 1 deletions

View File

@@ -636,7 +636,7 @@ GLFWAPI int glfwGetKeyScancode(int key)
if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST)
{
_glfwInputError(GLFW_INVALID_ENUM, "Invalid key %i", key);
return GLFW_RELEASE;
return -1;
}
return _glfwPlatformGetKeyScancode(key);