summaryrefslogtreecommitdiff
path: root/settings_gui.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-09-23 21:14:20 +0000
committerdarkvater <darkvater@openttd.org>2004-09-23 21:14:20 +0000
commitf3758d133a2a0330cdaee175383807bac0ad0249 (patch)
treeaa2a36ed9fc21776897ac8ece0176964b2798d57 /settings_gui.c
parentd72abf6c3ed68fe8e410f29458211aa04521c4ab (diff)
downloadopenttd-f3758d133a2a0330cdaee175383807bac0ad0249.tar.xz
(svn r312) -Fix: [926105] ctrl + d bug. Longest outstanding bug has been fixed \o/ 2004-03-30 (Tron)
-Fix: [1030393] some screensizes crashes OTTD. Fix in general bug that only allows resolutions which were multiple of 8 in width and height. Also use closest possible resolution in fullscreen if window size is not a valid resolution (Tron)
Diffstat (limited to 'settings_gui.c')
-rw-r--r--settings_gui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/settings_gui.c b/settings_gui.c
index ab413a858..9c158569e 100644
--- a/settings_gui.c
+++ b/settings_gui.c
@@ -53,8 +53,9 @@ static StringID *BuildDynamicDropdown(StringID base, int num)
static int GetCurRes()
{
int i;
- for(i=0; i!=_num_resolutions; i++)
- if (_resolutions[i][0] == _cur_resolution[0] && _resolutions[i][1] == _cur_resolution[1])
+ for(i = 0; i != _num_resolutions; i++)
+ if (_resolutions[i][0] == _screen.width &&
+ _resolutions[i][1] == _screen.height)
break;
return i;
}