mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-16 14:30:34 +00:00
Fix handling of nocdrom
This commit is contained in:
parent
bebeacc895
commit
23da9e72eb
@ -295,16 +295,18 @@ static bool position2msf(const cdrom_drive_info &info, uint16 postype, uint32 po
|
|||||||
void CDROMInit(void)
|
void CDROMInit(void)
|
||||||
{
|
{
|
||||||
// No drives specified in prefs? Then add defaults
|
// No drives specified in prefs? Then add defaults
|
||||||
if (PrefsFindString("cdrom", 0) == NULL)
|
if (PrefsFindString("cdrom", 0) == NULL) {
|
||||||
SysAddCDROMPrefs();
|
SysAddCDROMPrefs();
|
||||||
|
}
|
||||||
// Add drives specified in preferences
|
else {
|
||||||
int index = 0;
|
// Add drives specified in preferences
|
||||||
const char *str;
|
int index = 0;
|
||||||
while ((str = PrefsFindString("cdrom", index++)) != NULL) {
|
const char *str;
|
||||||
void *fh = Sys_open(str, true);
|
while ((str = PrefsFindString("cdrom", index++)) != NULL) {
|
||||||
if (fh)
|
void *fh = Sys_open(str, true);
|
||||||
drives.push_back(cdrom_drive_info(fh));
|
if (fh)
|
||||||
|
drives.push_back(cdrom_drive_info(fh));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!drives.empty()) { // set to first drive by default
|
if (!drives.empty()) { // set to first drive by default
|
||||||
|
Loading…
x
Reference in New Issue
Block a user