From 4b2a028c8002609bd9256d1f8fd73aceee5c44fc Mon Sep 17 00:00:00 2001
From: Bjørn Lindeijer <bjorn@lindeijer.nl>
Date: Sun, 13 Feb 2005 14:32:36 +0000
Subject: No need to keep track of mouse position ourselves. Also put default
 startup mode to windowed.

---
 src/graphic/graphic.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/graphic')

diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp
index a0786e59..835698b4 100644
--- a/src/graphic/graphic.cpp
+++ b/src/graphic/graphic.cpp
@@ -222,6 +222,8 @@ void Graphics::drawImageRect(
 void Graphics::updateScreen()
 {
     // Draw mouse before flipping
+    int mouseX, mouseY;
+    SDL_GetMouseState(&mouseX, &mouseY);
     mouseCursor->draw(screen, mouseX - 5, mouseY - 2);
 
     SDL_Flip(screen);
@@ -338,6 +340,10 @@ Engine::~Engine()
 
 void Engine::draw()
 {
+    // Get the current mouse position
+    int mouseX, mouseY;
+    SDL_GetMouseState(&mouseX, &mouseY);
+
     map_x = (player_node->x - 13) * 32 +
         get_x_offset(player_node);
     map_y = (player_node->y - 9) * 32 +
-- 
cgit v1.2.3-70-g09d2