- keymap.clear();
- keymap_lisp->get("jump-with-up", jump_with_up_kbd);
- lisp::ListIterator iter(keymap_lisp);
- while(iter.next()) {
- if (iter.item() == "map") {
- int key = -1;
- std::string control;
- const lisp::Lisp* map = iter.lisp();
- map->get("key", key);
- map->get("control", control);
+ // keycode values changed between SDL1 and SDL2, so we skip old SDL1
+ // based values and use the defaults instead on the first read of
+ // the config file
+ bool config_is_sdl2 = false;
+ keymap_lisp->get("sdl2", config_is_sdl2);
+ if (config_is_sdl2)
+ {
+ keymap.clear();
+ keymap_lisp->get("jump-with-up", jump_with_up_kbd);
+ lisp::ListIterator iter(keymap_lisp);
+ while(iter.next()) {
+ if (iter.item() == "map") {
+ int key = -1;
+ std::string control;
+ const lisp::Lisp* map = iter.lisp();
+ map->get("key", key);