mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-16 11:48:53 +01:00
Suport new mame xml format (changed "game" to "machine").
This commit is contained in:
parent
8f2f1d5839
commit
c19669e381
@ -417,7 +417,14 @@ bool MetadataDatabase::importMamelist(std::string filename, std::string collecti
|
|||||||
}
|
}
|
||||||
|
|
||||||
sqlite3_exec(handle, "BEGIN IMMEDIATE TRANSACTION;", NULL, NULL, &error);
|
sqlite3_exec(handle, "BEGIN IMMEDIATE TRANSACTION;", NULL, NULL, &error);
|
||||||
for (rapidxml::xml_node<> * game = rootNode->first_node("game"); game; game = game->next_sibling())
|
std::string gameNodeName = "game";
|
||||||
|
|
||||||
|
// support new mame formats
|
||||||
|
if(rootNode->first_node(gameNodeName.c_str()) == NULL) {
|
||||||
|
gameNodeName = "machine";
|
||||||
|
}
|
||||||
|
|
||||||
|
for (rapidxml::xml_node<> * game = rootNode->first_node(gameNodeName.c_str()); game; game = game->next_sibling())
|
||||||
{
|
{
|
||||||
rapidxml::xml_attribute<> *nameNode = game->first_attribute("name");
|
rapidxml::xml_attribute<> *nameNode = game->first_attribute("name");
|
||||||
rapidxml::xml_attribute<> *cloneOfXml = game->first_attribute("cloneof");
|
rapidxml::xml_attribute<> *cloneOfXml = game->first_attribute("cloneof");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user