mirror of https://github.com/encounter/SDL.git
Disable "The key you just pressed is not recognized by SDL." message by default
This commit is contained in:
parent
139192140c
commit
91ff88451b
|
@ -558,9 +558,9 @@ Cocoa_HandleKeyEvent(_THIS, NSEvent *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_SendKeyboardKey(SDL_PRESSED, code);
|
SDL_SendKeyboardKey(SDL_PRESSED, code);
|
||||||
#if 1
|
#ifdef DEBUG_SCANCODES
|
||||||
if (code == SDL_SCANCODE_UNKNOWN) {
|
if (code == SDL_SCANCODE_UNKNOWN) {
|
||||||
fprintf(stderr, "The key you just pressed is not recognized by SDL. To help get this fixed, report this to the SDL forums/mailing list <https://discourse.libsdl.org/> or to Christian Walther <cwalther@gmx.ch>. Mac virtual key code is %d.\n", scancode);
|
SDL_Log("The key you just pressed is not recognized by SDL. To help get this fixed, report this to the SDL forums/mailing list <https://discourse.libsdl.org/> or to Christian Walther <cwalther@gmx.ch>. Mac virtual key code is %d.\n", scancode);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
|
if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
|
||||||
|
|
|
@ -313,9 +313,11 @@ SDL_NACL_translate_keycode(int keycode)
|
||||||
if (keycode < SDL_arraysize(NACL_Keycodes)) {
|
if (keycode < SDL_arraysize(NACL_Keycodes)) {
|
||||||
scancode = NACL_Keycodes[keycode];
|
scancode = NACL_Keycodes[keycode];
|
||||||
}
|
}
|
||||||
|
#ifdef DEBUG_SCANCODES
|
||||||
if (scancode == SDL_SCANCODE_UNKNOWN) {
|
if (scancode == SDL_SCANCODE_UNKNOWN) {
|
||||||
SDL_Log("The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL forums/mailing list <https://discourse.libsdl.org/> NACL KeyCode %d", keycode);
|
SDL_Log("The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL forums/mailing list <https://discourse.libsdl.org/> NACL KeyCode %d", keycode);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return scancode;
|
return scancode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,11 @@ SDL_RISCOS_translate_keycode(int keycode)
|
||||||
if (keycode < SDL_arraysize(riscos_scancode_table)) {
|
if (keycode < SDL_arraysize(riscos_scancode_table)) {
|
||||||
scancode = riscos_scancode_table[keycode];
|
scancode = riscos_scancode_table[keycode];
|
||||||
|
|
||||||
|
#ifdef DEBUG_SCANCODES
|
||||||
if (scancode == SDL_SCANCODE_UNKNOWN) {
|
if (scancode == SDL_SCANCODE_UNKNOWN) {
|
||||||
SDL_Log("The key you just pressed is not recognized by SDL: %d", keycode);
|
SDL_Log("The key you just pressed is not recognized by SDL: %d", keycode);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return scancode;
|
return scancode;
|
||||||
|
|
Loading…
Reference in New Issue