mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-06-12 04:29:29 +00:00
Always save the cdrom entries from /dev/
This commit is contained in:
parent
4ba1c48ec8
commit
f2fcfffabb
|
@ -406,10 +406,15 @@ static NSString *makeRelativeIfNecessary(NSString *path)
|
||||||
// Remove all disks
|
// Remove all disks
|
||||||
while (PrefsFindString("disk"))
|
while (PrefsFindString("disk"))
|
||||||
PrefsRemoveItem("disk");
|
PrefsRemoveItem("disk");
|
||||||
// Remove all cdroms
|
// Remove all cdroms (but keep the ones in /dev/)
|
||||||
while (PrefsFindString("cdrom"))
|
const char *path;
|
||||||
PrefsRemoveItem("cdrom");
|
int index=0;
|
||||||
|
while ((path = PrefsFindString("cdrom", index++)) != NULL) {
|
||||||
|
NSString *p = [NSString stringWithUTF8String: path];
|
||||||
|
if(![p hasPrefix:@"/dev/"]) {
|
||||||
|
PrefsRemoveItem("cdrom");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Write all disks
|
// Write all disks
|
||||||
for (int i = 0; i < [diskArray count]; i++) {
|
for (int i = 0; i < [diskArray count]; i++) {
|
||||||
|
@ -417,8 +422,6 @@ static NSString *makeRelativeIfNecessary(NSString *path)
|
||||||
PrefsAddString([d isCDROM] ? "cdrom" : "disk", [[d path] UTF8String]);
|
PrefsAddString([d isCDROM] ? "cdrom" : "disk", [[d path] UTF8String]);
|
||||||
}
|
}
|
||||||
|
|
||||||
PrefsAddString("cdrom", "/dev/poll/cdrom");
|
|
||||||
|
|
||||||
PrefsReplaceInt32("bootdriver", ([bootFrom indexOfSelectedItem] == 1 ? CDROMRefNum : 0));
|
PrefsReplaceInt32("bootdriver", ([bootFrom indexOfSelectedItem] == 1 ? CDROMRefNum : 0));
|
||||||
PrefsReplaceString("rom", [[romFile stringValue] UTF8String]);
|
PrefsReplaceString("rom", [[romFile stringValue] UTF8String]);
|
||||||
PrefsReplaceString("extfs", [[unixRoot stringValue] UTF8String]);
|
PrefsReplaceString("extfs", [[unixRoot stringValue] UTF8String]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user