Fixed compiling if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM is not defined
authorSam Lantinga
Thu, 25 Jun 2015 07:17:08 -0700
changeset 97847d5a98aac368
parent 9783 013201812ffb
child 9785 6e87ae760e6d
Fixed compiling if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM is not defined
src/video/x11/SDL_x11events.c
src/video/x11/SDL_x11keyboard.c
     1.1 --- a/src/video/x11/SDL_x11events.c	Fri Jun 26 20:12:10 2015 +0200
     1.2 +++ b/src/video/x11/SDL_x11events.c	Thu Jun 25 07:17:08 2015 -0700
     1.3 @@ -789,7 +789,7 @@
     1.4  #if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
     1.5                  keysym = X11_XkbKeycodeToKeysym(display, keycode, 0, 0);
     1.6  #else
     1.7 -                keysym = XKeycodeToKeysym(display, keycode, 0);
     1.8 +                keysym = X11_XKeycodeToKeysym(display, keycode, 0);
     1.9  #endif
    1.10                  fprintf(stderr,
    1.11                          "The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode %d (%d), X11 KeySym 0x%lX (%s).\n",
     2.1 --- a/src/video/x11/SDL_x11keyboard.c	Fri Jun 26 20:12:10 2015 +0200
     2.2 +++ b/src/video/x11/SDL_x11keyboard.c	Thu Jun 25 07:17:08 2015 -0700
     2.3 @@ -154,7 +154,7 @@
     2.4  #if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
     2.5      keysym = X11_XkbKeycodeToKeysym(display, keycode, 0, 0);
     2.6  #else
     2.7 -    keysym = XKeycodeToKeysym(display, keycode, 0);
     2.8 +    keysym = X11_XKeycodeToKeysym(display, keycode, 0);
     2.9  #endif
    2.10      if (keysym == NoSymbol) {
    2.11          return SDL_SCANCODE_UNKNOWN;
    2.12 @@ -184,7 +184,7 @@
    2.13  #if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
    2.14      keysym = X11_XkbKeycodeToKeysym(display, keycode, 0, 0);
    2.15  #else
    2.16 -    keysym = XKeycodeToKeysym(display, keycode, 0);
    2.17 +    keysym = X11_XKeycodeToKeysym(display, keycode, 0);
    2.18  #endif
    2.19      if (keysym == NoSymbol) {
    2.20          return 0;
    2.21 @@ -265,7 +265,7 @@
    2.22  #if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
    2.23              sym = X11_XkbKeycodeToKeysym(data->display, i, 0, 0);
    2.24  #else
    2.25 -            sym = XKeycodeToKeysym(data->display, i, 0);
    2.26 +            sym = X11_XKeycodeToKeysym(data->display, i, 0);
    2.27  #endif
    2.28              if (sym != NoSymbol) {
    2.29                  SDL_Scancode scancode;