mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-17 00:39:17 +01:00
minor change to use mxml that is included with libogc (identical version)
This commit is contained in:
parent
c14cc361db
commit
0c2c543f46
2
Makefile
2
Makefile
@ -17,7 +17,7 @@ include $(DEVKITPPC)/wii_rules
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
TARGET := boot
|
TARGET := boot
|
||||||
BUILD := build
|
BUILD := build
|
||||||
SOURCES := source source/libwiigui source/images source/fonts source/sounds source/libwbfs source/unzip source/mxml
|
SOURCES := source source/libwiigui source/images source/fonts source/sounds source/libwbfs source/unzip
|
||||||
INCLUDES := source
|
INCLUDES := source
|
||||||
SVNDEV := -D'SVN_REV="$(shell svnversion -n ..)"'
|
SVNDEV := -D'SVN_REV="$(shell svnversion -n ..)"'
|
||||||
|
|
||||||
|
@ -5,10 +5,11 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <ogcsys.h>
|
#include <ogcsys.h>
|
||||||
|
#include <mxml.h>
|
||||||
#include "cfg.h"
|
#include "cfg.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "xml.h" /* XML - Lustar*/
|
#include "xml.h" /* XML - Lustar*/
|
||||||
#include "mxml/mxml.h"
|
|
||||||
|
|
||||||
struct SSettings Settings;
|
struct SSettings Settings;
|
||||||
|
|
||||||
|
21
source/xml.c
21
source/xml.c
@ -4,9 +4,8 @@ Load game information from XML - Lustar
|
|||||||
- MiniZip adapted by Tantric
|
- MiniZip adapted by Tantric
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <mxml.h>
|
||||||
#include "cfg.h"
|
#include "cfg.h"
|
||||||
|
|
||||||
#include "mxml/mxml.h"
|
|
||||||
#include "xml.h"
|
#include "xml.h"
|
||||||
#include "unzip/unzip.h"
|
#include "unzip/unzip.h"
|
||||||
|
|
||||||
@ -176,6 +175,7 @@ bool OpenXMLFile(char *filename)
|
|||||||
} else {
|
} else {
|
||||||
//if (xmldebug);
|
//if (xmldebug);
|
||||||
// xmlloadtime = dbg_time2(NULL);
|
// xmlloadtime = dbg_time2(NULL);
|
||||||
|
nodetree = emptynode;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -268,9 +268,8 @@ void LoadTitlesFromXML(char *langtxt, bool forcejptoen)
|
|||||||
/* langtxt: set to "English","French","German", to force language for all titles, or "" to load title depending on each game's setting */
|
/* langtxt: set to "English","French","German", to force language for all titles, or "" to load title depending on each game's setting */
|
||||||
/* forcejptoen: set to true to load English title instead of Japanese title when game is set to Japanese */
|
/* forcejptoen: set to true to load English title instead of Japanese title when game is set to Japanese */
|
||||||
{
|
{
|
||||||
|
if (nodeindex == NULL || nodedata == NULL)
|
||||||
if (nodeindex == NULL)
|
return;
|
||||||
return ;
|
|
||||||
|
|
||||||
bool forcelang = false;
|
bool forcelang = false;
|
||||||
if (strcmp(langtxt,""))
|
if (strcmp(langtxt,""))
|
||||||
@ -373,9 +372,9 @@ void GetPublisherFromGameid(char *idtxt, char *dest)
|
|||||||
bool LoadGameInfoFromXML(char* gameid, char* langtxt)
|
bool LoadGameInfoFromXML(char* gameid, char* langtxt)
|
||||||
/* gameid: full game id */
|
/* gameid: full game id */
|
||||||
/* langcode: "English","French","German" */
|
/* langcode: "English","French","German" */
|
||||||
{ bool exist=false;
|
{
|
||||||
if (nodeindex == NULL)
|
if (nodeindex == NULL || nodedata == NULL)
|
||||||
return exist;
|
return;
|
||||||
|
|
||||||
/* convert language text into ISO 639 two-letter language codes */
|
/* convert language text into ISO 639 two-letter language codes */
|
||||||
char langcode[100] = "";
|
char langcode[100] = "";
|
||||||
@ -389,11 +388,13 @@ bool LoadGameInfoFromXML(char* gameid, char* langtxt)
|
|||||||
*element_text = 0;
|
*element_text = 0;
|
||||||
|
|
||||||
/* search for game matching gameid */
|
/* search for game matching gameid */
|
||||||
while (strcmp(element_text,gameid) != 0)
|
while (1)
|
||||||
{ exist=true;
|
{
|
||||||
nodeid = mxmlIndexFind(nodeindex,"id", NULL);
|
nodeid = mxmlIndexFind(nodeindex,"id", NULL);
|
||||||
if (nodeid != NULL) {
|
if (nodeid != NULL) {
|
||||||
get_text(nodeid, element_text, sizeof(element_text));
|
get_text(nodeid, element_text, sizeof(element_text));
|
||||||
|
if (!strcmp(element_text,gameid))
|
||||||
|
break;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user