Bugfix for release so if the current used resolution string isn't properly detected we add it at the end.

- Updated win32 glest.ini and win32 installer script
This commit is contained in:
Mark Vejvoda
2010-04-06 23:50:06 +00:00
parent b4e662c886
commit b16b0f00fc
3 changed files with 45 additions and 12 deletions

View File

@@ -132,11 +132,21 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu):
labelScreenModes.init(leftLabelStart, leftline);
labelScreenModes.setText(lang.get("Resolution"));
listBoxScreenModes.init(leftColumnStart, leftline, 170);
string currentResString = config.getString("ScreenWidth") + "x" +
config.getString("ScreenHeight") + "-" +
intToStr(config.getInt("ColorBits"));
bool currentResolutionFound = false;
for(list<ModeInfo>::const_iterator it= modeInfos.begin(); it!=modeInfos.end(); ++it){
if((*it).getString() == currentResString) {
currentResolutionFound = true;
}
listBoxScreenModes.pushBackItem((*it).getString());
}
listBoxScreenModes.setSelectedItem(config.getString("ScreenWidth")+"x"+
config.getString("ScreenHeight")+"-"+intToStr(config.getInt("ColorBits")));
if(currentResolutionFound == false) {
listBoxScreenModes.pushBackItem(currentResString);
}
listBoxScreenModes.setSelectedItem(currentResString);
leftline-=30;
//filter