Merge pull request #15 from littlepig/master

Fixed a crash on the game due to trying to change resolution on Mac
master
Per Inge Mathisen 2011-09-14 02:34:52 -07:00
commit 006263776f
1 changed files with 7 additions and 0 deletions

View File

@ -918,6 +918,13 @@ bool runVideoOptionsMenu(void)
current = 0;
}
// We can't pick resolutions if there are any.
if (modes.isEmpty())
{
debug(LOG_ERROR,"No resolutions available to change.");
break;
}
// Set the new width and height (takes effect on restart)
war_SetWidth(modes[current].width());
war_SetHeight(modes[current].height());