mirror of
https://github.com/holub/mame
synced 2025-05-21 21:29:15 +03:00
cheat.c: added support for cheats with software list shortnames [Fabio Priuli]
This commit is contained in:
parent
413967aa4f
commit
c1dcd436fd
@ -1178,14 +1178,23 @@ void cheat_manager::reload()
|
||||
for (bool gotone = m_machine.m_devicelist.first(image); gotone; gotone = image->next(image))
|
||||
if (image->exists())
|
||||
{
|
||||
UINT32 crc = image->crc();
|
||||
if (crc != 0)
|
||||
// if we are loading through software lists, try to load shortname.xml
|
||||
if (image->software_entry() != NULL)
|
||||
{
|
||||
astring filename;
|
||||
filename.printf("%08X", crc);
|
||||
load_cheats(filename);
|
||||
load_cheats(image->basename());
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT32 crc = image->crc();
|
||||
if (crc != 0)
|
||||
{
|
||||
astring filename;
|
||||
filename.printf("%08X", crc);
|
||||
load_cheats(filename);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if we haven't found the cheats yet, load by basename
|
||||
|
Loading…
Reference in New Issue
Block a user