summaryrefslogtreecommitdiff
path: root/src/video/sdl_v.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-18 21:49:38 +0000
committerrubidium <rubidium@openttd.org>2008-04-18 21:49:38 +0000
commitdde68e922a58b8ffbdc75a9c46a1cd74b9dd6474 (patch)
tree92ccb2f516619d9f9a117d750c144fb6c3c478db /src/video/sdl_v.cpp
parent14dc60c8a1a31dc000d931e4c54350903ce3bc45 (diff)
downloadopenttd-dde68e922a58b8ffbdc75a9c46a1cd74b9dd6474.tar.xz
(svn r12779) -Codechange: remove a few constants from openttd.h.
Diffstat (limited to 'src/video/sdl_v.cpp')
-rw-r--r--src/video/sdl_v.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp
index 12478cfc9..6bf74488d 100644
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -127,8 +127,7 @@ static void GetVideoModes()
for (i = 0; modes[i]; i++) {
int w = modes[i]->w;
int h = modes[i]->h;
- if (IsInsideMM(w, 640, MAX_SCREEN_WIDTH + 1) &&
- IsInsideMM(h, 480, MAX_SCREEN_HEIGHT + 1)) {
+ if (w >= 640 && h >= 480) {
int j;
for (j = 0; j < n; j++) {
if (_resolutions[j][0] == w && _resolutions[j][1] == h) break;
@@ -419,8 +418,8 @@ static int PollEvent()
break;
case SDL_VIDEORESIZE: {
- int w = Clamp(ev.resize.w, 64, MAX_SCREEN_WIDTH);
- int h = Clamp(ev.resize.h, 64, MAX_SCREEN_HEIGHT);
+ int w = max(ev.resize.w, 64);
+ int h = max(ev.resize.h, 64);
ChangeResInGame(w, h);
break;
}