mirror of
https://github.com/holub/mame
synced 2025-05-13 17:38:21 +03:00
fixed minor flaw if a system has both compatible and parent sets. no whatsnew.
I am not sure if nested compatibility are allowed by MESS (I'm going to check it soonish), so for now I left the while loop in place even if it makes the logic not so plain...
This commit is contained in:
parent
5d8889e3ae
commit
8eb3191be4
@ -576,21 +576,25 @@ const char *hashfile_extrainfo(device_image_interface &image)
|
|||||||
/* now read the hash file */
|
/* now read the hash file */
|
||||||
image.crc();
|
image.crc();
|
||||||
extra_info = NULL;
|
extra_info = NULL;
|
||||||
int compat, drv = driver_list::find(image.device().machine().system());
|
int drv = driver_list::find(image.device().machine().system());
|
||||||
|
int compat, open = drv;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
rc = read_hash_config(image, driver_list::driver(drv).name);
|
rc = read_hash_config(image, driver_list::driver(open).name);
|
||||||
// first check if there are compatible systems
|
// first check if there are compatible systems
|
||||||
compat = driver_list::compatible_with(drv);
|
compat = driver_list::compatible_with(open);
|
||||||
// if so, try to open its hashfile
|
// if so, try to open its hashfile
|
||||||
if (compat != -1)
|
if (compat != -1)
|
||||||
drv = compat;
|
open = compat;
|
||||||
// otherwise, try with the parent
|
// otherwise, try with the parent
|
||||||
else
|
else
|
||||||
|
{
|
||||||
drv = driver_list::clone(drv);
|
drv = driver_list::clone(drv);
|
||||||
|
open = drv;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// if no extrainfo has been found but we can try a compatible or a parent set, go back
|
// if no extrainfo has been found but we can try a compatible or a parent set, go back
|
||||||
while (rc == NULL && drv != -1);
|
while (rc == NULL && open != -1);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user