Cleaned up VideoSystem initalisation
[supertux.git] / src / gui / menu.cpp
index f2347cb..be3b208 100644 (file)
@@ -31,6 +31,7 @@
 #include "video/drawing_context.hpp"
 #include "video/font.hpp"
 #include "video/renderer.hpp"
+#include "video/video_system.hpp"
 
 static const float MENU_REPEAT_INITIAL = 0.4f;
 static const float MENU_REPEAT_RATE    = 0.1f;
@@ -663,7 +664,7 @@ Menu::event(const SDL_Event& ev)
     case SDL_MOUSEBUTTONDOWN:
     if(ev.button.button == SDL_BUTTON_LEFT)
     {
-      Vector mouse_pos = Renderer::instance()->to_logical(ev.motion.x, ev.motion.y);
+      Vector mouse_pos = VideoSystem::current()->get_renderer().to_logical(ev.motion.x, ev.motion.y);
       int x = int(mouse_pos.x);
       int y = int(mouse_pos.y);
 
@@ -679,7 +680,7 @@ Menu::event(const SDL_Event& ev)
 
     case SDL_MOUSEMOTION:
     {
-      Vector mouse_pos = Renderer::instance()->to_logical(ev.motion.x, ev.motion.y);
+      Vector mouse_pos = VideoSystem::current()->get_renderer().to_logical(ev.motion.x, ev.motion.y);
       float x = mouse_pos.x;
       float y = mouse_pos.y;