From f3758d133a2a0330cdaee175383807bac0ad0249 Mon Sep 17 00:00:00 2001 From: darkvater Date: Thu, 23 Sep 2004 21:14:20 +0000 Subject: (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) --- settings_gui.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'settings_gui.c') 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; } -- cgit v1.2.3-54-g00ecf