Mac GUI: don't show /dev/poll/cdrom if it is configured as cdrom

This commit is contained in:
atmaxinger 2018-02-20 11:54:55 +01:00
parent 588a2ae9cd
commit 581ce7d971

View File

@ -120,11 +120,14 @@ static NSString *getStringFromPrefs(const char *key)
/* Fetch all CDROMs */ /* Fetch all CDROMs */
index = 0; index = 0;
while ((dsk = PrefsFindString("cdrom", index++)) != NULL) { while ((dsk = PrefsFindString("cdrom", index++)) != NULL) {
DiskType *disk = [[[DiskType alloc] init] autorelease]; NSString *path = [NSString stringWithUTF8String: dsk ];
[disk setPath:[NSString stringWithUTF8String: dsk ]]; if(![path isEqualToString:@"/dev/poll/cdrom"]) {
[disk setIsCDROM:YES]; DiskType *disk = [[[DiskType alloc] init] autorelease];
[disk setPath:[NSString stringWithUTF8String: dsk ]];
[disk setIsCDROM:YES];
[diskArray addObject:disk]; [diskArray addObject:disk];
}
} }
[disks setDataSource: self]; [disks setDataSource: self];