aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/audiocd/macosx/macosx-audiocd.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/backends/audiocd/macosx/macosx-audiocd.cpp b/backends/audiocd/macosx/macosx-audiocd.cpp
index a8ba712621..76bae95500 100644
--- a/backends/audiocd/macosx/macosx-audiocd.cpp
+++ b/backends/audiocd/macosx/macosx-audiocd.cpp
@@ -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();