mirror of
https://github.com/akuker/RASCSI.git
synced 2025-08-14 16:27:46 +00:00
Updated handling of removed status for devices without image file support
This commit is contained in:
@@ -732,9 +732,13 @@ bool Attach(int fd, const PbDeviceDefinition& pb_device, Device *map[], bool dry
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no filename was provided the media is considered removed
|
// If no filename was provided the medium is considered removed
|
||||||
if (filename.empty()) {
|
FileSupport *file_support = dynamic_cast<FileSupport *>(device);
|
||||||
device->SetRemoved(true);
|
if (file_support) {
|
||||||
|
device->SetRemoved(filename.empty());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
device->SetRemoved(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
device->SetId(id);
|
device->SetId(id);
|
||||||
@@ -771,8 +775,6 @@ bool Attach(int fd, const PbDeviceDefinition& pb_device, Device *map[], bool dry
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FileSupport *file_support = dynamic_cast<FileSupport *>(device);
|
|
||||||
|
|
||||||
// File check (type is HD, for removable media drives, CD and MO the medium (=file) may be inserted later)
|
// File check (type is HD, for removable media drives, CD and MO the medium (=file) may be inserted later)
|
||||||
if (file_support && !device->IsRemovable() && filename.empty()) {
|
if (file_support && !device->IsRemovable() && filename.empty()) {
|
||||||
delete device;
|
delete device;
|
||||||
|
Reference in New Issue
Block a user