mirror of
https://github.com/glfw/glfw.git
synced 2026-09-23 00:59:48 +00:00
Improve error description for invalid scancodes
This commit is contained in:
@@ -524,6 +524,12 @@ const char* _glfwPlatformGetClipboardString(void)
|
||||
|
||||
const char* _glfwPlatformGetScancodeName(int scancode)
|
||||
{
|
||||
if (scancode < GLFW_KEY_SPACE || scancode > GLFW_KEY_LAST)
|
||||
{
|
||||
_glfwInputError(GLFW_INVALID_VALUE, "Invalid scancode %i", scancode);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
switch (scancode)
|
||||
{
|
||||
case GLFW_KEY_APOSTROPHE:
|
||||
|
||||
Reference in New Issue
Block a user