diff --git a/README.md b/README.md index 9f91667a..19e361c6 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,7 @@ information on what to include when reporting a bug. ## Changelog + - Bugfix: `glfwGetKeyScancode` returned `0` on error when initialized instead of `-1` - [Win32] Fix pkg-config for dynamic library on Windows (#2386, #2420) - [Win32] Bugfix: `glfwWaitEventsTimeout` did not return for some sent messages (#2408) - [Wayland] Added improved fallback window decorations via libdecor (#1639,#1693) diff --git a/src/input.c b/src/input.c index 7ea1222c..047d75dc 100644 --- a/src/input.c +++ b/src/input.c @@ -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);