mirror of
https://github.com/holub/mame
synced 2025-05-23 14:19:01 +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))
|
for (bool gotone = m_machine.m_devicelist.first(image); gotone; gotone = image->next(image))
|
||||||
if (image->exists())
|
if (image->exists())
|
||||||
{
|
{
|
||||||
UINT32 crc = image->crc();
|
// if we are loading through software lists, try to load shortname.xml
|
||||||
if (crc != 0)
|
if (image->software_entry() != NULL)
|
||||||
{
|
{
|
||||||
astring filename;
|
load_cheats(image->basename());
|
||||||
filename.printf("%08X", crc);
|
|
||||||
load_cheats(filename);
|
|
||||||
break;
|
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
|
// if we haven't found the cheats yet, load by basename
|
||||||
|
Loading…
Reference in New Issue
Block a user