Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added back in a little more debugging for the X11 keyboard code
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 18, 2010
1 parent 4428772 commit 0e0cfed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/video/x11/SDL_x11events.c
Expand Up @@ -34,7 +34,7 @@
#include "SDL_timer.h"
#include "SDL_syswm.h"

/*#define DEBUG_XEVENTS*/
#define DEBUG_XEVENTS

static void
X11_DispatchEvent(_THIS)
Expand Down Expand Up @@ -181,7 +181,7 @@ X11_DispatchEvent(_THIS)
printf("KeyPress (X11 keycode = 0x%X)\n", xevent.xkey.keycode);
#endif
SDL_SendKeyboardKey(SDL_PRESSED, videodata->key_layout[keycode]);
#if 0
#if 1
if (videodata->key_layout[keycode] == SDLK_UNKNOWN) {
int min_keycode, max_keycode;
XDisplayKeycodes(display, &min_keycode, &max_keycode);
Expand Down
4 changes: 3 additions & 1 deletion src/video/x11/SDL_x11keyboard.c
Expand Up @@ -211,7 +211,9 @@ X11_InitKeyboard(_THIS)
}
}
if (j == SDL_arraysize(fingerprint)) {
/* printf("Using scancode set %d\n", i); */
#ifdef DEBUG_KEYBOARD
printf("Using scancode set %d, min_keycode = %d, max_keycode = %d, table_size = %d\n", i, min_keycode, max_keycode, scancode_set[i].table_size);
#endif
SDL_memcpy(&data->key_layout[min_keycode], scancode_set[i].table,
sizeof(SDL_scancode) * scancode_set[i].table_size);
fingerprint_detected = SDL_TRUE;
Expand Down

0 comments on commit 0e0cfed

Please sign in to comment.