summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2009-03-08 12:49:01 +0000
committer Olivier Galibert <galibert@pobox.com>2009-03-08 12:49:01 +0000
commit3f12ffd1d11f22d73e2017f1b444c7d72a2141cd (patch)
treec094e6a39e9ea4892c228020e7fd4bbd1225f4c8
parent8e2173e06ebe7df3a1fda81b695500fe55ed4b48 (diff)
Allow chds to be directly in the rom directory without a subdirectory
-rw-r--r--src/emu/romload.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/emu/romload.c b/src/emu/romload.c
index 1e49104f1a1..6b7877e5d44 100644
--- a/src/emu/romload.c
+++ b/src/emu/romload.c
@@ -1031,6 +1031,13 @@ chd_error open_disk_image_options(core_options *options, const game_driver *game
astring_free(fname);
}
+ if (filerr != FILERR_NONE)
+ {
+ astring *fname = astring_assemble_2(astring_alloc(), ROM_GETNAME(romp), ".chd");
+ filerr = mame_fopen_options(options, SEARCHPATH_IMAGE, astring_c(fname), OPEN_FLAG_READ, image_file);
+ astring_free(fname);
+ }
+
/* did the file open succeed? */
if (filerr == FILERR_NONE)
{
@@ -1067,6 +1074,13 @@ chd_error open_disk_image_options(core_options *options, const game_driver *game
astring_free(fname);
}
+ if (filerr != FILERR_NONE)
+ {
+ astring *fname = astring_assemble_2(astring_alloc(), ROM_GETNAME(rom), ".chd");
+ filerr = mame_fopen_options(options, SEARCHPATH_IMAGE, astring_c(fname), OPEN_FLAG_READ, image_file);
+ astring_free(fname);
+ }
+
/* did the file open succeed? */
if (filerr == FILERR_NONE)
{