summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-07-29 19:18:22 +0000
committerrubidium <rubidium@openttd.org>2007-07-29 19:18:22 +0000
commit17370d5ae7db88664dddf561ca7247d33d74fbcf (patch)
tree745241429ade176ce7329dc9e03909ba24becfc7 /src/gfx.cpp
parent5e1cd09ea41afe34e1b35b7d694f86a2589d4c68 (diff)
downloadopenttd-17370d5ae7db88664dddf561ca7247d33d74fbcf.tar.xz
(svn r10725) -Codechange: move some window related code out of gfx.cpp to windows.cpp
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index ed0077e3f..f20f34923 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -21,7 +21,6 @@
#include "texteff.hpp"
#include "blitter/factory.hpp"
#include "video/video_driver.hpp"
-#include "window.h"
byte _dirkeys; ///< 1 = left, 2 = up, 4 = right, 8 = down
bool _fullscreen;
@@ -1150,26 +1149,7 @@ void SetAnimatedMouseCursor(const AnimCursor *table)
bool ChangeResInGame(int width, int height)
{
- bool ret = (_screen.width == width && _screen.height == height) || _video_driver->ChangeResolution(width, height);
-
- int new_width = min(_screen.width, 640);
- Window *w = FindWindowById(WC_MAIN_TOOLBAR, 0);
- if (w != NULL && new_width != w->width) {
- ResizeWindow(w, new_width - w->width, 0);
-
- Window *w2 = FindWindowById(WC_STATUS_BAR, 0);
- if (w2 != NULL) ResizeWindow(w2, max(new_width, 320) - w2->width, 0);
-
- WindowEvent e;
- e.event = WE_RESIZE;
- e.we.sizing.size.x = w->width;
- e.we.sizing.size.y = w->height;
- e.we.sizing.diff.x = new_width - w->width;
- e.we.sizing.diff.y = 0;
- w->wndproc(w, &e);
- }
-
- return ret;
+ return (_screen.width == width && _screen.height == height) || _video_driver->ChangeResolution(width, height);
}
void ToggleFullScreen(bool fs)