mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00: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:
parent
2a4e26870b
commit
11f517e557
@ -123,6 +123,7 @@ information on what to include when reporting a bug.
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
- Bugfix: `glfwGetKeyScancode` returned `0` on error when initialized instead of `-1`
|
||||||
- [Win32] Fix pkg-config for dynamic library on Windows (#2386, #2420)
|
- [Win32] Fix pkg-config for dynamic library on Windows (#2386, #2420)
|
||||||
- [Win32] Bugfix: `glfwWaitEventsTimeout` did not return for some sent messages (#2408)
|
- [Win32] Bugfix: `glfwWaitEventsTimeout` did not return for some sent messages (#2408)
|
||||||
- [Wayland] Added improved fallback window decorations via libdecor (#1639,#1693)
|
- [Wayland] Added improved fallback window decorations via libdecor (#1639,#1693)
|
||||||
|
@ -636,7 +636,7 @@ GLFWAPI int glfwGetKeyScancode(int key)
|
|||||||
if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST)
|
if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_INVALID_ENUM, "Invalid key %i", key);
|
_glfwInputError(GLFW_INVALID_ENUM, "Invalid key %i", key);
|
||||||
return GLFW_RELEASE;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _glfwPlatformGetKeyScancode(key);
|
return _glfwPlatformGetKeyScancode(key);
|
||||||
|
Loading…
Reference in New Issue
Block a user