From d2c8c5094c2cb2256c57e636e5eb95030ea66027 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 1 Oct 2016 14:54:05 -0700 Subject: [PATCH] Fixed build for X11 --- src/video/x11/SDL_x11keyboard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video/x11/SDL_x11keyboard.c b/src/video/x11/SDL_x11keyboard.c index 4e7a84832..2e80b73a9 100644 --- a/src/video/x11/SDL_x11keyboard.c +++ b/src/video/x11/SDL_x11keyboard.c @@ -330,13 +330,14 @@ X11_UpdateKeymap(_THIS) #if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM { + XkbStateRec state; + if (data->xkb) { X11_XkbGetUpdatedMap(data->display, XkbAllClientInfoMask, data->xkb); } else { data->xkb = X11_XkbGetMap(data->display, XkbAllClientInfoMask, XkbUseCoreKbd); } - XkbStateRec state; if (X11_XkbGetState(data->display, XkbUseCoreKbd, &state) == Success) { group = state.group; }