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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user