- if (joystick_num >= 0)
- {
- reader.read_int ("joystick-x", joystick_keymap.x_axis);
- reader.read_int ("joystick-y", joystick_keymap.y_axis);
- reader.read_int ("joystick-a", joystick_keymap.a_button);
- reader.read_int ("joystick-b", joystick_keymap.b_button);
- reader.read_int ("joystick-start", joystick_keymap.start_button);
- reader.read_int ("joystick-deadzone", joystick_keymap.dead_zone);
+ lisp::Parser parser;
+ try {
+ std::auto_ptr<lisp::Lisp> root (parser.parse(st_dir + config_filename));
+
+ const lisp::Lisp* config_lisp = root->get_lisp(
+ package_symbol_name + "-config");
+ if(!config_lisp)
+ throw new std::runtime_error("Config file is not a supertux-config file");
+
+ config_lisp->get("fullscreen", use_fullscreen);
+ bool temp = false;
+ if(config_lisp->get("sound", temp))
+ SoundManager::get()->enable_sound(temp);
+ if(config_lisp->get("music", temp))
+ SoundManager::get()->enable_music(temp);
+ config_lisp->get("show_fps", show_fps);
+
+ std::string video;
+ if(config_lisp->get("video", video)) {
+ if (video == "opengl")
+ use_gl = true;
+ else
+ use_gl = false;