Skip to content

Commit 1ab6163

Browse files
committed
Use SDL_Log() for keyboard debugging.
1 parent 29c684c commit 1ab6163

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/events/SDL_keyboard.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
#include "SDL_keymap_c.h"
2727
#include "../video/SDL_sysvideo.h"
2828

29-
// #define DEBUG_KEYBOARD
29+
#if 0
30+
#define DEBUG_KEYBOARD
31+
#endif
3032

3133
// Global keyboard information
3234

@@ -217,7 +219,7 @@ void SDL_ResetKeyboard(void)
217219
int scancode;
218220

219221
#ifdef DEBUG_KEYBOARD
220-
printf("Resetting keyboard\n");
222+
SDL_Log("Resetting keyboard\n");
221223
#endif
222224
for (scancode = SDL_SCANCODE_UNKNOWN; scancode < SDL_SCANCODE_COUNT; ++scancode) {
223225
if (keyboard->keystate[scancode]) {
@@ -514,7 +516,7 @@ static bool SDL_SendKeyboardKeyInternal(Uint64 timestamp, Uint32 flags, SDL_Keyb
514516
const Uint8 source = flags & KEYBOARD_SOURCE_MASK;
515517

516518
#ifdef DEBUG_KEYBOARD
517-
printf("The '%s' key has been %s\n", SDL_GetScancodeName(scancode), down ? "pressed" : "released");
519+
SDL_Log("The '%s' key has been %s\n", SDL_GetScancodeName(scancode), down ? "pressed" : "released");
518520
#endif
519521

520522
// Figure out what type of event this is

0 commit comments

Comments
 (0)