| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> |
| | | Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | |
| | | { |
| | | SDL_Keyboard *keyboard = &SDL_keyboard; |
| | | |
| | | if (((int)scancode) < ((int)SDL_SCANCODE_UNKNOWN) || scancode >= SDL_NUM_SCANCODES) { |
| | | if (((int)scancode) < SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) { |
| | | SDL_InvalidParamError("scancode"); |
| | | return 0; |
| | | } |
| | |
| | | SDL_GetScancodeName(SDL_Scancode scancode) |
| | | { |
| | | const char *name; |
| | | if (((int)scancode) < ((int)SDL_SCANCODE_UNKNOWN) || scancode >= SDL_NUM_SCANCODES) { |
| | | if (((int)scancode) < SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) { |
| | | SDL_InvalidParamError("scancode"); |
| | | return ""; |
| | | } |