Changeset - r4501:e7f75bb5d329
[Not reviewed]
master
0 1 0
tron - 18 years ago 2006-08-31 20:06:31
tron@openttd.org
(svn r6286) Nobody cares for the return value of GetAvailableVideoMode(), therefore remove it
1 file changed with 3 insertions and 6 deletions:
0 comments (0 inline, 0 general)
video/sdl_v.c
Show inline comments
 
@@ -126,26 +126,24 @@ static void GetVideoModes(void)
 
		}
 
		_num_resolutions = n;
 
		SortResolutions(_num_resolutions);
 
	}
 
}
 

	
 
static int GetAvailableVideoMode(int *w, int *h)
 
static void GetAvailableVideoMode(int *w, int *h)
 
{
 
	int i;
 
	int best;
 
	uint delta;
 

	
 
	// all modes available?
 
	if (_all_modes)
 
		return 1;
 
	if (_all_modes) return;
 

	
 
	// is the wanted mode among the available modes?
 
	for (i = 0; i != _num_resolutions; i++) {
 
		if (*w == _resolutions[i][0] && *h == _resolutions[i][1])
 
			return 1;
 
		if (*w == _resolutions[i][0] && *h == _resolutions[i][1]) return;
 
	}
 

	
 
	// use the closest possible resolution
 
	best = 0;
 
	delta = abs((_resolutions[0][0] - *w) * (_resolutions[0][1] - *h));
 
	for (i = 1; i != _num_resolutions; ++i) {
 
@@ -154,13 +152,12 @@ static int GetAvailableVideoMode(int *w,
 
			best = i;
 
			delta = newdelta;
 
		}
 
	}
 
	*w = _resolutions[best][0];
 
	*h = _resolutions[best][1];
 
	return 2;
 
}
 

	
 
extern const char _openttd_revision[];
 

	
 
#ifndef ICON_DIR
 
#define ICON_DIR "media"
0 comments (0 inline, 0 general)