Changeset - r23790:75606400a38f
[Not reviewed]
master
0 2 0
glx - 5 years ago 2019-07-28 15:02:41
glx@openttd.org
Fix #7672: more than 32 resolutions may be available
2 files changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/strings.cpp
Show inline comments
 
@@ -1673,7 +1673,7 @@ static char *GetSpecialNameString(char *
 
	}
 

	
 
	/* resolution size? */
 
	if (IsInsideMM(ind, (SPECSTR_RESOLUTION_START - 0x70E4), (SPECSTR_RESOLUTION_END - 0x70E4) + 1)) {
 
	if (IsInsideBS(ind, (SPECSTR_RESOLUTION_START - 0x70E4), _resolutions.size())) {
 
		int i = ind - (SPECSTR_RESOLUTION_START - 0x70E4);
 
		buff += seprintf(
 
			buff, last, "%ux%u", _resolutions[i].width, _resolutions[i].height
src/strings_type.h
Show inline comments
 
@@ -93,9 +93,8 @@ enum SpecialStrings {
 
	SPECSTR_LANGUAGE_START     = 0x7100,
 
	SPECSTR_LANGUAGE_END       = SPECSTR_LANGUAGE_START + MAX_LANG - 1,
 

	
 
	/* reserve 32 strings for various screen resolutions */
 
	/* reserve strings for various screen resolutions MUST BE THE LAST VALUE IN THIS ENUM */
 
	SPECSTR_RESOLUTION_START   = SPECSTR_LANGUAGE_END + 1,
 
	SPECSTR_RESOLUTION_END     = SPECSTR_RESOLUTION_START + 0x1F,
 
};
 

	
 
#endif /* STRINGS_TYPE_H */
0 comments (0 inline, 0 general)