diff --git a/source/glest_game/menu/menu_state_options_graphics.cpp b/source/glest_game/menu/menu_state_options_graphics.cpp index fd2d50bc..71d5c6e6 100644 --- a/source/glest_game/menu/menu_state_options_graphics.cpp +++ b/source/glest_game/menu/menu_state_options_graphics.cpp @@ -598,6 +598,16 @@ void MenuStateOptionsGraphics::mouseClick(int x, int y, MouseButton mouseButton) selectedMode = &(*it); } } + if(selectedMode == NULL) { // if we cannot find the selectedResolution we try it with current one + for(vector::const_iterator it= modeInfos.begin(); it!=modeInfos.end(); ++it) { + if((*it).getString() == currentResolution) { + //config.setInt("ScreenWidth",(*it).width); + //config.setInt("ScreenHeight",(*it).height); + //config.setInt("ColorBits",(*it).depth); + selectedMode = &(*it); + } + } + } if(selectedMode == NULL) { throw megaglest_runtime_error("selectedMode == NULL"); }