From b681d85d5f0531582f4ec22e67840ead78e845e6 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 23 Mar 2018 08:54:24 +0000 Subject: [PATCH] fix compilation on machines that have X11 libraries installed, but use an sdl without X11. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4087 --- src/gui/sdl_mapper.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/sdl_mapper.cpp b/src/gui/sdl_mapper.cpp index 136e979a..360c36bf 100644 --- a/src/gui/sdl_mapper.cpp +++ b/src/gui/sdl_mapper.cpp @@ -2459,6 +2459,8 @@ void MAPPER_StartUp(Section * sec) { sdlkey_map[0x41]=SDLK_KP6; #elif !defined (WIN32) /* => Linux & BSDs */ bool evdev_input = false; +#ifdef SDL_VIDEO_DRIVER_X11 +//SDL needs to be compiled to use it, else the next makes no sense. #ifdef C_X11_XKB SDL_SysWMinfo info; SDL_VERSION(&info.version); @@ -2477,6 +2479,7 @@ void MAPPER_StartUp(Section * sec) { XkbFreeClientMap(desc,0,True); } } +#endif #endif if (evdev_input) { sdlkey_map[0x67]=SDLK_UP;