mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-18 12:30:33 +00:00
Only remove item at index
This commit is contained in:
parent
f2fcfffabb
commit
515746d584
@ -409,11 +409,13 @@ static NSString *makeRelativeIfNecessary(NSString *path)
|
|||||||
// Remove all cdroms (but keep the ones in /dev/)
|
// Remove all cdroms (but keep the ones in /dev/)
|
||||||
const char *path;
|
const char *path;
|
||||||
int index=0;
|
int index=0;
|
||||||
while ((path = PrefsFindString("cdrom", index++)) != NULL) {
|
while ((path = PrefsFindString("cdrom", index)) != NULL) {
|
||||||
NSString *p = [NSString stringWithUTF8String: path];
|
NSString *p = [NSString stringWithUTF8String: path];
|
||||||
if(![p hasPrefix:@"/dev/"]) {
|
if(![p hasPrefix:@"/dev/"]) {
|
||||||
PrefsRemoveItem("cdrom");
|
PrefsRemoveItem("cdrom", index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write all disks
|
// Write all disks
|
||||||
|
Loading…
x
Reference in New Issue
Block a user