Skip to content

Commit

Permalink
Fix utmapp#3333 floppy drive is read only
Browse files Browse the repository at this point in the history
Fixed by checking if the drive interface is "floppy"; if so the media type is set correctly to "disk" instead of "cdrom".
  • Loading branch information
conath committed Jan 1, 2022
1 parent 19ebb10 commit 3968ab9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Managers/UTMQemuSystem.m
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,10 @@ - (void)argsForDrives {
BOOL removable = (type == UTMDiskImageTypeCD) || [self.configuration driveRemovableForIndex:i];
NSString *identifier = [self.configuration driveNameForIndex:i];
NSString *realInterface = [self expandDriveInterface:interface identifier:identifier removable:removable busInterfaceMap:busInterfaceMap];
BOOL floppy = [realInterface containsString:@"floppy"];
NSString *drive;
[self pushArgv:@"-drive"];
drive = [NSString stringWithFormat:@"if=%@,media=%@,id=%@", realInterface, removable ? @"cdrom" : @"disk", identifier];
drive = [NSString stringWithFormat:@"if=%@,media=%@,id=%@", realInterface, (removable && !floppy) ? @"cdrom" : @"disk", identifier];
if (hasImage) {
drive = [NSString stringWithFormat:@"%@,file=%@,cache=writethrough", drive, fullPathURL.path];
}
Expand Down

0 comments on commit 3968ab9

Please sign in to comment.