revert change that disallowed reloading of fonts via F2
This commit is contained in:
+21
-14
@@ -76,7 +76,7 @@
|
||||
ScreenManager* SCREENMAN = NULL; // global and accessable from anywhere in our program
|
||||
|
||||
static Preference<bool> g_bDelayedScreenLoad( "DelayedScreenLoad", false );
|
||||
static Preference<bool> g_bPruneFonts( "PruneFonts", true );
|
||||
//static Preference<bool> g_bPruneFonts( "PruneFonts", true );
|
||||
|
||||
// Screen registration
|
||||
static map<RString,CreateScreenFn> *g_pmapRegistrees = NULL;
|
||||
@@ -592,9 +592,11 @@ void ScreenManager::PrepareScreen( const RString &sScreenName )
|
||||
}
|
||||
|
||||
// Prune any unused fonts now that we have had a chance to reference the fonts
|
||||
/*
|
||||
if(g_bPruneFonts) {
|
||||
FONT->PruneFonts();
|
||||
}
|
||||
*/
|
||||
|
||||
TEXTUREMAN->DiagnosticOutput();
|
||||
}
|
||||
@@ -690,17 +692,19 @@ void ScreenManager::LoadDelayedScreen()
|
||||
* cleanup, so it doesn't get deleted by cleanup. */
|
||||
bool bLoaded = ActivatePreparedScreenAndBackground( sScreenName );
|
||||
|
||||
bool deletePrepared=g_setGroupedScreens.find(sScreenName) == g_setGroupedScreens.end();
|
||||
|
||||
/* It's time to delete all old prepared screens. Depending on DelayedScreenLoad,
|
||||
* we can either delete the screens before or after we load the new screen.
|
||||
* Either way, we must remove them from the prepared list before we prepare
|
||||
* new screens.
|
||||
* If DelayedScreenLoad is true, delete them now; this lowers memory
|
||||
* requirements, but results in redundant loads as we unload common data. */
|
||||
if( deletePrepared && g_bDelayedScreenLoad ) {
|
||||
DeletePreparedScreens();
|
||||
deletePrepared=false;
|
||||
vector<Actor*> apActorsToDelete;
|
||||
if( g_setGroupedScreens.find(sScreenName) == g_setGroupedScreens.end() )
|
||||
{
|
||||
/* It's time to delete all old prepared screens. Depending on
|
||||
* DelayedScreenLoad, we can either delete the screens before or after
|
||||
* we load the new screen. Either way, we must remove them from the
|
||||
* prepared list before we prepare new screens.
|
||||
* If DelayedScreenLoad is true, delete them now; this lowers memory
|
||||
* requirements, but results in redundant loads as we unload common data. */
|
||||
if( g_bDelayedScreenLoad )
|
||||
DeletePreparedScreens();
|
||||
else
|
||||
GrabPreparedActors( apActorsToDelete );
|
||||
}
|
||||
|
||||
// If the screen wasn't already prepared, load it.
|
||||
@@ -717,9 +721,12 @@ void ScreenManager::LoadDelayedScreen()
|
||||
ASSERT( bLoaded );
|
||||
}
|
||||
|
||||
if( deletePrepared )
|
||||
if( !apActorsToDelete.empty() )
|
||||
{
|
||||
DeletePreparedScreens();
|
||||
BeforeDeleteScreen();
|
||||
FOREACH( Actor*, apActorsToDelete, a )
|
||||
SAFE_DELETE( *a );
|
||||
AfterDeleteScreen();
|
||||
}
|
||||
|
||||
MESSAGEMAN->Broadcast( Message_ScreenChanged );
|
||||
|
||||
Reference in New Issue
Block a user