mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Fixed compiling if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM is not defined
This commit is contained in:
parent
c5857ab498
commit
f1b7a8434f
@ -789,7 +789,7 @@ X11_DispatchEvent(_THIS)
|
|||||||
#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
||||||
keysym = X11_XkbKeycodeToKeysym(display, keycode, 0, 0);
|
keysym = X11_XkbKeycodeToKeysym(display, keycode, 0, 0);
|
||||||
#else
|
#else
|
||||||
keysym = XKeycodeToKeysym(display, keycode, 0);
|
keysym = X11_XKeycodeToKeysym(display, keycode, 0);
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"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",
|
"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",
|
||||||
|
@ -154,7 +154,7 @@ X11_KeyCodeToSDLScancode(Display *display, KeyCode keycode)
|
|||||||
#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
||||||
keysym = X11_XkbKeycodeToKeysym(display, keycode, 0, 0);
|
keysym = X11_XkbKeycodeToKeysym(display, keycode, 0, 0);
|
||||||
#else
|
#else
|
||||||
keysym = XKeycodeToKeysym(display, keycode, 0);
|
keysym = X11_XKeycodeToKeysym(display, keycode, 0);
|
||||||
#endif
|
#endif
|
||||||
if (keysym == NoSymbol) {
|
if (keysym == NoSymbol) {
|
||||||
return SDL_SCANCODE_UNKNOWN;
|
return SDL_SCANCODE_UNKNOWN;
|
||||||
@ -184,7 +184,7 @@ X11_KeyCodeToUcs4(Display *display, KeyCode keycode)
|
|||||||
#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
||||||
keysym = X11_XkbKeycodeToKeysym(display, keycode, 0, 0);
|
keysym = X11_XkbKeycodeToKeysym(display, keycode, 0, 0);
|
||||||
#else
|
#else
|
||||||
keysym = XKeycodeToKeysym(display, keycode, 0);
|
keysym = X11_XKeycodeToKeysym(display, keycode, 0);
|
||||||
#endif
|
#endif
|
||||||
if (keysym == NoSymbol) {
|
if (keysym == NoSymbol) {
|
||||||
return 0;
|
return 0;
|
||||||
@ -265,7 +265,7 @@ X11_InitKeyboard(_THIS)
|
|||||||
#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
||||||
sym = X11_XkbKeycodeToKeysym(data->display, i, 0, 0);
|
sym = X11_XkbKeycodeToKeysym(data->display, i, 0, 0);
|
||||||
#else
|
#else
|
||||||
sym = XKeycodeToKeysym(data->display, i, 0);
|
sym = X11_XKeycodeToKeysym(data->display, i, 0);
|
||||||
#endif
|
#endif
|
||||||
if (sym != NoSymbol) {
|
if (sym != NoSymbol) {
|
||||||
SDL_Scancode scancode;
|
SDL_Scancode scancode;
|
||||||
|
Loading…
Reference in New Issue
Block a user