From: Florian Forster Date: Thu, 14 Jan 2010 17:41:14 +0000 (+0100) Subject: src/control/joystickkeyboardcontroller.cpp: Add SDL 1.3 compatibility code. X-Git-Url: https://git.octo.it/?a=commitdiff_plain;ds=sidebyside;h=5a6d2c8d918480f53612c7a2347251ced9a1ba75;p=supertux.git src/control/joystickkeyboardcontroller.cpp: Add SDL 1.3 compatibility code. --- diff --git a/src/control/joystickkeyboardcontroller.cpp b/src/control/joystickkeyboardcontroller.cpp index 761c6a074..fa7d75fc9 100644 --- a/src/control/joystickkeyboardcontroller.cpp +++ b/src/control/joystickkeyboardcontroller.cpp @@ -186,7 +186,12 @@ JoystickKeyboardController::read(const Reader& lisp) const lisp::Lisp* map = iter.lisp(); map->get("key", key); map->get("control", control); - if(key < SDLK_FIRST || key >= SDLK_LAST) { +#if SDL_VERSION_ATLEAST(1,3,0) + if(key < 0) +#else + if(key < SDLK_FIRST || key >= SDLK_LAST) +#endif + { log_info << "Invalid key '" << key << "' in keymap" << std::endl; continue; }