X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsupertux%2Fmain.cpp;h=17571a3c8c2a5c8bb411e595b8cbc4a6df22f5bd;hb=c0e497c19521c1868f44c0fd21bbf666a66654be;hp=5d3747d1bcc76bd68cd528117d46835eb26fd38c;hpb=3ab7afdbe1add3de1da13c04002253f4af5eb35e;p=supertux.git diff --git a/src/supertux/main.cpp b/src/supertux/main.cpp index 5d3747d1b..17571a3c8 100644 --- a/src/supertux/main.cpp +++ b/src/supertux/main.cpp @@ -299,6 +299,11 @@ Main::launch_game() SDLSubsystem sdl_subsystem; ConsoleBuffer console_buffer; + timelog("audio"); + SoundManager sound_manager; + sound_manager.enable_sound(g_config->sound_enabled); + sound_manager.enable_music(g_config->music_enabled); + timelog("controller"); InputManager input_manager(g_config->keyboard_config, g_config->joystick_config); @@ -306,15 +311,9 @@ Main::launch_game() timelog("video"); std::unique_ptr video_system = VideoSystem::create(g_config->video); - DrawingContext context(video_system->get_renderer(), - video_system->get_lightmap()); + DrawingContext context(*video_system); init_video(); - timelog("audio"); - SoundManager sound_manager; - sound_manager.enable_sound(g_config->sound_enabled); - sound_manager.enable_music(g_config->music_enabled); - Console console(console_buffer); timelog("scripting"); @@ -326,8 +325,7 @@ Main::launch_game() Resources resources; timelog("addons"); - AddonManager addon_manager(g_config->disabled_addon_filenames); - addon_manager.load_addons(); + AddonManager addon_manager("addons", g_config->addons); timelog(0);