fix catalog.xml out of date after reloading songs

This commit is contained in:
Chris Danford
2006-05-16 06:01:12 +00:00
parent 721d2083b9
commit f22d32f70a
4 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ const RString CATALOG_XSL = "Catalog.xsl";
const RString CATALOG_XML_FILE = "Save/" + CATALOG_XML;
static LocalizedString SAVING_CATALOG_XML( "CatalogXml", "Saving %s ..." );
void SaveCatalogXml( LoadingWindow *loading_window )
void CatalogXml::Save( LoadingWindow *loading_window )
{
ASSERT( SONGMAN );
ASSERT( UNLOCKMAN );
+4 -1
View File
@@ -9,7 +9,10 @@ extern const RString CATALOG_XML;
extern const RString CATALOG_XSL;
extern const RString CATALOG_XML_FILE;
void SaveCatalogXml( LoadingWindow *ld );
namespace CatalogXml
{
void Save( LoadingWindow *ld );
};
#endif
+2
View File
@@ -34,6 +34,7 @@
#include "CourseLoaderCRS.h"
#include "TitleSubstitution.h"
#include "LocalizedString.h"
#include "CatalogXml.h"
SongManager* SONGMAN = NULL; // global and accessable from anywhere in our program
@@ -99,6 +100,7 @@ void SongManager::Reload( bool bAllowFastLoad, LoadingWindow *ld )
// reload scores and unlocks afterward
PROFILEMAN->LoadMachineProfile();
UNLOCKMAN->Reload();
CatalogXml::Save( NULL );
if( !bAllowFastLoad )
PREFSMAN->m_bFastLoad.Set( OldVal );
+1 -1
View File
@@ -1063,7 +1063,7 @@ int main(int argc, char* argv[])
/* This shouldn't need to be here; if it's taking long enough that this is
* even visible, we should be fixing it, not showing a progress display. */
SaveCatalogXml( loading_window );
CatalogXml::Save( loading_window );
NSMAN = new NetworkSyncManager( loading_window );
MESSAGEMAN = new MessageManager;