making all softwarelist devices to appear in the listxml output (no mention needed, being 99.9% MESS related)

also amended incorrect comment about year
This commit is contained in:
Fabio Priuli 2010-08-24 19:39:27 +00:00
parent 3256f11a61
commit 2a7fd2bcee

View File

@ -979,9 +979,10 @@ static void print_game_software_list(FILE *out, const game_driver *game, const m
for ( int i = 0; i < DEVINFO_STR_SWLIST_MAX - DEVINFO_STR_SWLIST_0; i++ )
{
if ( swlist->list_name[i] && (swlist->list_type == SOFTWARE_LIST_ORIGINAL_SYSTEM))
if ( swlist->list_name[i] )
{
fprintf(out, "\t\t<softwarelist name=\"%s\" />\n", swlist->list_name[i] );
fprintf(out, "\t\t<softwarelist name=\"%s\" ", swlist->list_name[i] );
fprintf(out, "status=\"%s\" />\n", (swlist->list_type == SOFTWARE_LIST_ORIGINAL_SYSTEM) ? "original" : "compatible" );
}
}
}
@ -1040,7 +1041,7 @@ static void print_game_info(FILE *out, const game_driver *game)
if (game->description != NULL)
fprintf(out, "\t\t<description>%s</description>\n", xml_normalize_string(game->description));
/* print the year only if is a number */
/* print the year only if is a number or another allowed character (? or +) */
if (game->year != NULL && strspn(game->year, "0123456789?+") == strlen(game->year))
fprintf(out, "\t\t<year>%s</year>\n", xml_normalize_string(game->year));
@ -1212,6 +1213,7 @@ void print_mame_xml(FILE *out, const game_driver *const games[], const char *gam
"\t\t\t\t<!ATTLIST extension name CDATA #REQUIRED>\n"
"\t\t<!ELEMENT softwarelist EMPTY>\n"
"\t\t\t<!ATTLIST softwarelist name CDATA #REQUIRED>\n"
"\t\t\t<!ATTLIST softwarelist status (original|compatible) #REQUIRED>\n"
#ifdef MESS
"\t\t<!ELEMENT ramoption (#PCDATA)>\n"
"\t\t\t<!ATTLIST ramoption default CDATA #IMPLIED>\n"