mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-17 19:30:44 +00:00
Updated handling of removed status for devices without image file support
This commit is contained in:
parent
695a9967b8
commit
db6a5a0970
@ -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 (filename.empty()) {
|
||||
device->SetRemoved(true);
|
||||
// If no filename was provided the medium is considered removed
|
||||
FileSupport *file_support = dynamic_cast<FileSupport *>(device);
|
||||
if (file_support) {
|
||||
device->SetRemoved(filename.empty());
|
||||
}
|
||||
else {
|
||||
device->SetRemoved(false);
|
||||
}
|
||||
|
||||
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)
|
||||
if (file_support && !device->IsRemovable() && filename.empty()) {
|
||||
delete device;
|
||||
|
Loading…
x
Reference in New Issue
Block a user