cheat.c: added support for cheats with software list shortnames [Fabio Priuli]

This commit is contained in:
Fabio Priuli 2011-01-12 14:55:40 +00:00
parent 413967aa4f
commit c1dcd436fd

View File

@ -1177,6 +1177,14 @@ void cheat_manager::reload()
device_image_interface *image = NULL;
for (bool gotone = m_machine.m_devicelist.first(image); gotone; gotone = image->next(image))
if (image->exists())
{
// if we are loading through software lists, try to load shortname.xml
if (image->software_entry() != NULL)
{
load_cheats(image->basename());
break;
}
else
{
UINT32 crc = image->crc();
if (crc != 0)
@ -1187,6 +1195,7 @@ void cheat_manager::reload()
break;
}
}
}
// if we haven't found the cheats yet, load by basename
if (m_cheatlist.count() == 0)