mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
BACKENDS: Add support for opening a CD on Mac OS X by path or drive
This commit is contained in:
parent
4a6c7b5c83
commit
dc0d4fcf30
@ -52,6 +52,7 @@ public:
|
||||
|
||||
protected:
|
||||
bool openCD(int drive);
|
||||
bool openCD(const Common::String &drive);
|
||||
|
||||
private:
|
||||
struct Drive {
|
||||
@ -135,6 +136,24 @@ bool MacOSXAudioCDManager::openCD(int drive) {
|
||||
return findTrackNames(cddaDrives[drive].mountPoint);
|
||||
}
|
||||
|
||||
bool MacOSXAudioCDManager::openCD(const Common::String &drive) {
|
||||
closeCD();
|
||||
|
||||
DriveList drives = detectAllDrives();
|
||||
|
||||
for (uint32 i = 0; i < drives.size(); i++) {
|
||||
if (drives[i].fsType != "cddafs")
|
||||
continue;
|
||||
|
||||
if (drives[i].mountPoint == drive || drives[i].deviceName == drive) {
|
||||
debug(1, "Using '%s' as the CD drive", drives[i].mountPoint.c_str());
|
||||
return findTrackNames(drives[i].mountPoint);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void MacOSXAudioCDManager::closeCD() {
|
||||
stop();
|
||||
_trackMap.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user