Fix softload of cassettes (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2011-12-05 09:50:39 +00:00
parent dfbcf3106b
commit 3f1e25efc4

View File

@ -270,7 +270,17 @@ bool cassette_image_device::call_load()
{
is_writable = !is_readonly();
cassette_flags = is_writable ? (CASSETTE_FLAG_READWRITE|CASSETTE_FLAG_SAVEONEXIT) : CASSETTE_FLAG_READONLY;
extension = filetype();
if (software_entry()==NULL) {
extension = filetype();
} else {
astring fname = astring(m_mame_file->filename());
int loc = fname.rchr(0,'.');
if (loc!=-1) {
extension = fname.substr(loc + 1,fname.len()-loc).cstr();
} else {
extension = "";
}
}
err = cassette_open_choices((void *)image, &image_ioprocs, extension, m_formats, cassette_flags, &m_cassette);
/* this is kind of a hack */