diff options
Diffstat (limited to 'src/emu/fileio.cpp')
-rw-r--r-- | src/emu/fileio.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/emu/fileio.cpp b/src/emu/fileio.cpp index 2233586fe6b..2a2682874c4 100644 --- a/src/emu/fileio.cpp +++ b/src/emu/fileio.cpp @@ -762,16 +762,21 @@ osd_file::error emu_file::attempt_zipped() int header = -1; // see if we can find a file with the right name and (if available) CRC - if (m_openflags & OPEN_FLAG_HAS_CRC) header = zip->search(m_crc, filename, false); - if (header < 0 && (m_openflags & OPEN_FLAG_HAS_CRC)) header = zip->search(m_crc, filename, true); + if (m_openflags & OPEN_FLAG_HAS_CRC) + header = zip->search(m_crc, filename, false); + if (header < 0 && (m_openflags & OPEN_FLAG_HAS_CRC)) + header = zip->search(m_crc, filename, true); // if that failed, look for a file with the right CRC, but the wrong filename - if (header < 0 && (m_openflags & OPEN_FLAG_HAS_CRC)) header = zip->search(m_crc); + if (header < 0 && (m_openflags & OPEN_FLAG_HAS_CRC)) + header = zip->search(m_crc); // if that failed, look for a file with the right name; // reporting a bad checksum is more helpful and less confusing than reporting "ROM not found" - if (header < 0) header = zip->search(filename, false); - if (header < 0) header = zip->search(filename, true); + if (header < 0) + header = zip->search(filename, false); + if (header < 0) + header = zip->search(filename, true); // if we got it, read the data if (header >= 0) @@ -782,6 +787,7 @@ osd_file::error emu_file::attempt_zipped() // build a hash with just the CRC m_hashes.reset(); m_hashes.add_crc(m_zipfile->current_crc()); + m_fullpath = savepath; return (m_openflags & OPEN_FLAG_NO_PRELOAD) ? osd_file::error::NONE : load_zipped_file(); } |