X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsupertux%2Fmain.cpp;h=376e5ee6e2d09b1db3413a1d87202766dcdf4c6f;hb=c946dc68fba6690788b4190e95690e5c576d3a5a;hp=ab41bea88f2227d9e2030d396d51e999ac0ee785;hpb=f385db90dcb9888695e012f4f2f54e6f145c1023;p=supertux.git diff --git a/src/supertux/main.cpp b/src/supertux/main.cpp index ab41bea88..376e5ee6e 100644 --- a/src/supertux/main.cpp +++ b/src/supertux/main.cpp @@ -212,7 +212,7 @@ Main::init_rand() void Main::init_video() { - SDL_SetWindowTitle(Renderer::instance()->get_window(), PACKAGE_NAME " " PACKAGE_VERSION); + SDL_SetWindowTitle(VideoSystem::current()->get_renderer().get_window(), PACKAGE_NAME " " PACKAGE_VERSION); const char* icon_fname = "images/engine/icons/supertux-256x256.png"; SDL_Surface* icon = IMG_Load_RW(get_physfs_SDLRWops(icon_fname), true); @@ -222,7 +222,7 @@ Main::init_video() } else { - SDL_SetWindowIcon(Renderer::instance()->get_window(), icon); + SDL_SetWindowIcon(VideoSystem::current()->get_renderer().get_window(), icon); SDL_FreeSurface(icon); } SDL_ShowCursor(0); @@ -336,9 +336,9 @@ Main::run(int argc, char** argv) timelog("commandline"); timelog("video"); - std::unique_ptr renderer(VideoSystem::new_renderer()); - std::unique_ptr lightmap(VideoSystem::new_lightmap()); - DrawingContext context(*renderer, *lightmap); + std::unique_ptr video_system = VideoSystem::create(g_config->video); + DrawingContext context(video_system->get_renderer(), + video_system->get_lightmap()); context_pointer = &context; init_video();