mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
load xml at startup and keep it in memory instead of each time the game info is called. it adds 1 second to my startup time with 100+ games. just testing to see if breaks anything doing it like this now that the xml is much smaller.
This commit is contained in:
parent
4886c5cc11
commit
18489a8858
@ -39,6 +39,7 @@
|
||||
#include "listfiles.h"
|
||||
#include "fatmounter.h"
|
||||
#include "buffer.h"
|
||||
#include "xml/xml.h"
|
||||
|
||||
#include "usbloader/wdvd.h"
|
||||
|
||||
@ -1740,7 +1741,7 @@ int MainMenu(int menu)
|
||||
|
||||
|
||||
}
|
||||
|
||||
CloseXMLDatabase();
|
||||
ExitGUIThreads();
|
||||
bgMusic->Stop();
|
||||
delete bgMusic;
|
||||
|
@ -261,21 +261,27 @@ int autoSelectDol(const char *id)
|
||||
if (strcmp(id,"RMZX69") == 0) return 492;
|
||||
if (strcmp(id,"RMZP69") == 0) return 492;
|
||||
|
||||
//if (strcmp(id,"REDP41") == 0) return 1957;
|
||||
if (strcmp(id,"REDP41") == 0) return 1957;
|
||||
|
||||
if (strcmp(id,"RSXP69") == 0) return 337;
|
||||
|
||||
if (strcmp(id,"RNBX69") == 0) return 964;
|
||||
|
||||
if (strcmp(id,"RNFP69") == 0) return 1079;
|
||||
|
||||
if (strcmp(id,"RMLP7U") == 0) return 56;
|
||||
|
||||
if (strcmp(id,"RKMP5D") == 0) return 290;
|
||||
|
||||
if (strcmp(id,"R5TP69") == 0) return 1493;
|
||||
|
||||
if (strcmp(id,"RHDP8P") == 0) return 149;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
/* Grand Slam R5TP69 1493
|
||||
Madden NFL08 RNFP69 1079
|
||||
|
||||
Fifa08 RF8P69 463
|
||||
Fifa08 RF8X69 464
|
||||
Wii Sports Resort RZTP01 952
|
||||
|
@ -24,6 +24,8 @@ extern GuiWindow * mainWindow;
|
||||
extern GuiSound * bgMusic;
|
||||
extern u8 shutdown;
|
||||
extern u8 reset;
|
||||
extern struct gameXMLinfo gameinfo;
|
||||
extern struct gameXMLinfo gameinfo_reset;
|
||||
|
||||
/*** Extern functions ***/
|
||||
extern void ResumeGui();
|
||||
|
@ -1718,8 +1718,8 @@ void CFG_Load(void)
|
||||
Global_Default(); //global default depends on theme information
|
||||
CFG_LoadGlobal();
|
||||
|
||||
if (Settings.titlesOverride==1) OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, true, false); // open file, load titles, do not keep in memory
|
||||
|
||||
//if (Settings.titlesOverride==1) OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, true, false); // open file, load titles, do not keep in memory
|
||||
OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true);
|
||||
// loaded after database to override database titles with custom titles
|
||||
snprintf(pathname, sizeof(pathname), "%stitles.txt", Settings.titlestxt_path);
|
||||
cfg_parsefile(pathname, &title_set);
|
||||
|
@ -21,6 +21,9 @@ static char xmlcfg_filename[100] = "wiitdb.zip";
|
||||
|
||||
extern struct SSettings Settings; // for loader GX
|
||||
|
||||
struct gameXMLinfo gameinfo;
|
||||
struct gameXMLinfo gameinfo_reset;
|
||||
|
||||
|
||||
|
||||
static char langlist[11][22] =
|
||||
|
@ -56,8 +56,7 @@ struct gameXMLinfo
|
||||
char iso_sha1[41];
|
||||
} ;
|
||||
|
||||
struct gameXMLinfo gameinfo;
|
||||
struct gameXMLinfo gameinfo_reset;
|
||||
|
||||
|
||||
bool OpenXMLFile(char* filename);
|
||||
void LoadTitlesFromXML(char *langcode, bool forcejptoen);
|
||||
|
Loading…
Reference in New Issue
Block a user