Fixed mixup in the config reading that caused keyboard to reset, also use reference...
[supertux.git] / src / control / joystick_config.cpp
index e155cf1..6a0db69 100644 (file)
@@ -155,12 +155,12 @@ JoystickConfig::bind_joybutton(JoyId joy_id, int button, Controller::Control con
 }
 
 void
-JoystickConfig::read(const lisp::Lisp* joystick_lisp)
+JoystickConfig::read(const lisp::Lisp& joystick_lisp)
 {
-  joystick_lisp->get("dead-zone", dead_zone);
-  joystick_lisp->get("jump-with-up", jump_with_up_joy);
+  joystick_lisp.get("dead-zone", dead_zone);
+  joystick_lisp.get("jump-with-up", jump_with_up_joy);
 
-  lisp::ListIterator iter(joystick_lisp);
+  lisp::ListIterator iter(&joystick_lisp);
   while(iter.next())
   {
     if (iter.item() == "map")