Manual content scan arcade DAT files: Add support for MAME 'Software List' XML format

This commit is contained in:
jdgleaver 2019-12-04 16:19:32 +00:00
parent 9b012e907a
commit a27ee73622
2 changed files with 15 additions and 9 deletions

View File

@ -125,10 +125,12 @@ logiqx_dat_t *logiqx_dat_init(const char *path)
if (string_is_empty(root_node->name))
goto error;
/* > Logiqx XML uses: 'datafile'
* > MAME List XML uses: 'mame' */
/* > Logiqx XML uses: 'datafile'
* > MAME List XML uses: 'mame'
* > MAME 'Software List' uses: 'softwarelist' */
if (!string_is_equal(root_node->name, "datafile") &&
!string_is_equal(root_node->name, "mame"))
!string_is_equal(root_node->name, "mame") &&
!string_is_equal(root_node->name, "softwarelist"))
goto error;
/* Get pointer to initial child node */
@ -179,10 +181,12 @@ static bool logiqx_dat_is_game_node(rxml_node_t *node)
if (string_is_empty(node_name))
return false;
/* > Logiqx XML uses: 'game'
* > MAME List XML uses: 'machine' */
/* > Logiqx XML uses: 'game'
* > MAME List XML uses: 'machine'
* > MAME 'Software List' uses: 'software' */
return string_is_equal(node_name, "game") ||
string_is_equal(node_name, "machine");
string_is_equal(node_name, "machine") ||
string_is_equal(node_name, "software");
}
/* Returns true if specified node is a game

View File

@ -35,9 +35,11 @@ RETRO_BEGIN_DECLS
* functionality - predominantly concerned with obtaining
* description text for specific arcade ROM images.
*
* Note: Also supports MAME List XML format, since
* this is almost identical to Logiqx XML (or at
* least, the parts we use are almost identical...) */
* Note: Also supports the following alternative DAT
* formats, since they are functionally identical to
* Logiqx XML (but with different element names):
* > MAME List XML
* > MAME 'Software List' */
/* Prevent direct access to logiqx_dat_t members */
typedef struct logiqx_dat logiqx_dat_t;