mirror of
https://github.com/holub/mame
synced 2025-06-01 18:41:47 +03:00
Display correct software load messages depending of supported attribute value (no whatsnew)
This commit is contained in:
parent
e6bad2ec08
commit
b2bf27c8ac
@ -79,6 +79,7 @@ struct _romload_private
|
||||
memory_region * region; /* info about current region */
|
||||
|
||||
astring errorstring; /* error string */
|
||||
astring softwarningstring; /* software warning string */
|
||||
};
|
||||
|
||||
|
||||
@ -1299,15 +1300,18 @@ void load_software_part_region(device_t *device, char *swlist, char *swname, rom
|
||||
assert(device != NULL);
|
||||
|
||||
romdata->errorstring.reset();
|
||||
romdata->softwarningstring.reset();
|
||||
|
||||
if (software_get_support(device->machine().options(), swlist, swname) == SOFTWARE_SUPPORTED_PARTIAL)
|
||||
{
|
||||
romdata->errorstring.catprintf("WARNING: support for software %s (in list %s) is only partial\n", swname, swlist);
|
||||
romdata->softwarningstring.catprintf("Support for software %s (in list %s) is only partial\n", swname, swlist);
|
||||
romdata->warnings++;
|
||||
}
|
||||
if (software_get_support(device->machine().options(), swlist, swname) == SOFTWARE_SUPPORTED_NO)
|
||||
{
|
||||
romdata->errorstring.catprintf("WARNING: support for software %s (in list %s) is only preliminary\n", swname, swlist);
|
||||
romdata->softwarningstring.catprintf("Support for software %s (in list %s) is only preliminary\n", swname, swlist);
|
||||
romdata->warnings++;
|
||||
}
|
||||
|
||||
@ -1490,6 +1494,16 @@ int rom_load_warnings(running_machine &machine)
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
software_load_warnings_message - return the
|
||||
software load warnings we generated
|
||||
-------------------------------------------------*/
|
||||
|
||||
astring& software_load_warnings_message(running_machine &machine)
|
||||
{
|
||||
return machine.romload_data->softwarningstring;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
rom_load_knownbad - return the number of
|
||||
BAD_DUMP/NO_DUMP warnings we generated
|
||||
|
@ -264,6 +264,7 @@ void rom_init(running_machine &machine);
|
||||
|
||||
/* return the number of warnings we generated */
|
||||
int rom_load_warnings(running_machine &machine);
|
||||
astring& software_load_warnings_message(running_machine &machine);
|
||||
|
||||
/* return the number of BAD_DUMP/NO_DUMP warnings we generated */
|
||||
int rom_load_knownbad(running_machine &machine);
|
||||
|
@ -909,7 +909,7 @@ static astring &warnings_string(running_machine &machine, astring &string)
|
||||
string.reset();
|
||||
|
||||
/* if no warnings, nothing to return */
|
||||
if (rom_load_warnings(machine) == 0 && rom_load_knownbad(machine) == 0 && !(machine.system().flags & WARNING_FLAGS))
|
||||
if (rom_load_warnings(machine) == 0 && rom_load_knownbad(machine) == 0 && !(machine.system().flags & WARNING_FLAGS) && software_load_warnings_message(machine).len()==0)
|
||||
return string;
|
||||
|
||||
/* add a warning if any ROMs were loaded with warnings */
|
||||
@ -922,6 +922,11 @@ static astring &warnings_string(running_machine &machine, astring &string)
|
||||
string.cat("\n");
|
||||
}
|
||||
|
||||
if (software_load_warnings_message(machine).len()) {
|
||||
string.cat(software_load_warnings_message(machine));
|
||||
if (machine.system().flags & WARNING_FLAGS)
|
||||
string.cat("\n");
|
||||
}
|
||||
/* if we have at least one warning flag, print the general header */
|
||||
if ((machine.system().flags & WARNING_FLAGS) || rom_load_knownbad(machine) > 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user