From 8ea989626785c9a386bf4aef1b44fd201b677a08 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 16 Apr 2007 17:48:28 +0000 Subject: [PATCH] don't adjust aspect-ratio in non-fullscreen modes, removed a few unneeded headers SVN-Revision: 4986 --- src/console.cpp | 1 + src/gui/mousecursor.cpp | 7 +++---- src/main.cpp | 4 +++- src/sprite/sprite.hpp | 2 -- src/video/drawing_context.hpp | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/console.cpp b/src/console.cpp index 2a7dbdc82..d636f67e8 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -20,6 +20,7 @@ #include #include +#include #include "console.hpp" #include "video/drawing_context.hpp" #include "video/surface.hpp" diff --git a/src/gui/mousecursor.cpp b/src/gui/mousecursor.cpp index b2010c58d..ba2da7742 100644 --- a/src/gui/mousecursor.cpp +++ b/src/gui/mousecursor.cpp @@ -19,6 +19,9 @@ #include +#include +#include + #include "video/drawing_context.hpp" #include "gui/mousecursor.hpp" #include "main.hpp" @@ -31,15 +34,11 @@ MouseCursor::MouseCursor(std::string cursor_file) : mid_x(0), mid_y(0) cursor = new Surface(cursor_file); cur_state = MC_NORMAL; - - SDL_ShowCursor(SDL_DISABLE); } MouseCursor::~MouseCursor() { delete cursor; - - SDL_ShowCursor(SDL_ENABLE); } int MouseCursor::state() diff --git a/src/main.cpp b/src/main.cpp index a7159263d..8a7ba54a8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -411,11 +411,13 @@ void init_video() } #endif + SDL_ShowCursor(0); + double aspect_ratio = config->aspect_ratio; // try to guess aspect ratio of monitor if needed if (aspect_ratio <= 0) { - if(desktop_width > 0) { + if(config->use_fullscreen && desktop_width > 0) { aspect_ratio = static_cast(desktop_width) / static_cast(desktop_height); } else { aspect_ratio = 4.0 / 3.0; diff --git a/src/sprite/sprite.hpp b/src/sprite/sprite.hpp index b85b62ed4..a3edb3353 100644 --- a/src/sprite/sprite.hpp +++ b/src/sprite/sprite.hpp @@ -22,7 +22,6 @@ #include #include -#include #include "math/vector.hpp" #include "math/rect.hpp" @@ -32,7 +31,6 @@ class Surface; class DrawingContext; -class Color; class Blend; class Sprite diff --git a/src/video/drawing_context.hpp b/src/video/drawing_context.hpp index b742b3726..296ea8eb7 100644 --- a/src/video/drawing_context.hpp +++ b/src/video/drawing_context.hpp @@ -21,12 +21,12 @@ #include #include +#include + #include #include -#include -#include -#include +#include #include "obstack/obstack.h" #include "math/vector.hpp" -- 2.11.0