mirror of
https://github.com/glfw/glfw.git
synced 2026-02-17 21:12:34 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user