mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Fix return value on error for glfwGetKeyScancode
The documentation says it should be -1, not zero.
This commit is contained in:
parent
fb94e4268b
commit
8c5471d6cd
@ -183,6 +183,7 @@ information on what to include when reporting a bug.
|
|||||||
- Bugfix: `glfwMakeContextCurrent` would access TLS slot before initialization
|
- Bugfix: `glfwMakeContextCurrent` would access TLS slot before initialization
|
||||||
- Bugfix: `glfwSetGammaRamp` could emit `GLFW_INVALID_VALUE` before initialization
|
- Bugfix: `glfwSetGammaRamp` could emit `GLFW_INVALID_VALUE` before initialization
|
||||||
- Bugfix: `glfwGetJoystickUserPointer` returned `NULL` during disconnection (#2092)
|
- Bugfix: `glfwGetJoystickUserPointer` returned `NULL` during disconnection (#2092)
|
||||||
|
- Bugfix: `glfwGetKeyScancode` returned `0` on error when initialized instead of `-1`
|
||||||
- [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
|
||||||
|
@ -721,7 +721,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 _glfw.platform.getKeyScancode(key);
|
return _glfw.platform.getKeyScancode(key);
|
||||||
|
Loading…
Reference in New Issue
Block a user