projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dd793c9
)
don't adjust aspect-ratio in non-fullscreen modes, removed a few unneeded headers
author
Matthias Braun
<matze@braunis.de>
Mon, 16 Apr 2007 17:48:28 +0000
(17:48 +0000)
committer
Matthias Braun
<matze@braunis.de>
Mon, 16 Apr 2007 17:48:28 +0000
(17:48 +0000)
SVN-Revision: 4986
src/console.cpp
patch
|
blob
|
history
src/gui/mousecursor.cpp
patch
|
blob
|
history
src/main.cpp
patch
|
blob
|
history
src/sprite/sprite.hpp
patch
|
blob
|
history
src/video/drawing_context.hpp
patch
|
blob
|
history
diff --git
a/src/console.cpp
b/src/console.cpp
index
2a7dbdc
..
d636f67
100644
(file)
--- a/
src/console.cpp
+++ b/
src/console.cpp
@@
-20,6
+20,7
@@
#include <iostream>
#include <SDL_timer.h>
#include <iostream>
#include <SDL_timer.h>
+#include <SDL_keyboard.h>
#include "console.hpp"
#include "video/drawing_context.hpp"
#include "video/surface.hpp"
#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
b2010c5
..
ba2da77
100644
(file)
--- a/
src/gui/mousecursor.cpp
+++ b/
src/gui/mousecursor.cpp
@@
-19,6
+19,9
@@
#include <config.h>
#include <config.h>
+#include <SDL_events.h>
+#include <SDL_mouse.h>
+
#include "video/drawing_context.hpp"
#include "gui/mousecursor.hpp"
#include "main.hpp"
#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;
cursor = new Surface(cursor_file);
cur_state = MC_NORMAL;
-
- SDL_ShowCursor(SDL_DISABLE);
}
MouseCursor::~MouseCursor()
{
delete cursor;
}
MouseCursor::~MouseCursor()
{
delete cursor;
-
- SDL_ShowCursor(SDL_ENABLE);
}
int MouseCursor::state()
}
int MouseCursor::state()
diff --git
a/src/main.cpp
b/src/main.cpp
index
a715926
..
8a7ba54
100644
(file)
--- a/
src/main.cpp
+++ b/
src/main.cpp
@@
-411,11
+411,13
@@
void init_video()
}
#endif
}
#endif
+ SDL_ShowCursor(0);
+
double aspect_ratio = config->aspect_ratio;
// try to guess aspect ratio of monitor if needed
if (aspect_ratio <= 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<double>(desktop_width) / static_cast<double>(desktop_height);
} else {
aspect_ratio = 4.0 / 3.0;
aspect_ratio = static_cast<double>(desktop_width) / static_cast<double>(desktop_height);
} else {
aspect_ratio = 4.0 / 3.0;
diff --git
a/src/sprite/sprite.hpp
b/src/sprite/sprite.hpp
index
b85b62e
..
a3edb33
100644
(file)
--- a/
src/sprite/sprite.hpp
+++ b/
src/sprite/sprite.hpp
@@
-22,7
+22,6
@@
#include <string>
#include <assert.h>
#include <string>
#include <assert.h>
-#include <SDL.h>
#include "math/vector.hpp"
#include "math/rect.hpp"
#include "math/vector.hpp"
#include "math/rect.hpp"
@@
-32,7
+31,6
@@
class Surface;
class DrawingContext;
class Surface;
class DrawingContext;
-class Color;
class Blend;
class Sprite
class Blend;
class Sprite
diff --git
a/src/video/drawing_context.hpp
b/src/video/drawing_context.hpp
index
b742b37
..
296ea8e
100644
(file)
--- a/
src/video/drawing_context.hpp
+++ b/
src/video/drawing_context.hpp
@@
-21,12
+21,12
@@
#include <vector>
#include <string>
#include <vector>
#include <string>
+#include <memory>
+
#include <stdint.h>
#include <GL/gl.h>
#include <stdint.h>
#include <GL/gl.h>
-#include <SDL.h>
-#include <stdint.h>
-#include <memory>
+#include <SDL_video.h>
#include "obstack/obstack.h"
#include "math/vector.hpp"
#include "obstack/obstack.h"
#include "math/vector.hpp"