Don't construct overlay screens in ScreenManager ctor. We havn't reset

GAMESTATE by then, so much of it is uninitialized, and we should not load
screens until that's done.  (fixes valgrind warning due to IsEventMode()
being called from SSystemLayer)
This commit is contained in:
Glenn Maynard
2005-06-23 00:30:02 +00:00
parent d1b8dcc744
commit c587f12d65
2 changed files with 4 additions and 7 deletions
+4
View File
@@ -1149,6 +1149,10 @@ int main(int argc, char* argv[])
HOOKS->BoostPriority();
ResetGame();
/* Now that GAMESTATE is reset, tell SCREENMAN to update the theme (load
* overlay screens and global sounds), and load the initial screen. */
SCREENMAN->ThemeChanged();
SCREENMAN->SetNewScreen( INITIAL_SCREEN );
CodeDetector::RefreshCacheItems();