diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/audiocd/audiocd.h | 3 | ||||
-rw-r--r-- | backends/audiocd/default/default-audiocd.cpp | 5 | ||||
-rw-r--r-- | backends/audiocd/default/default-audiocd.h | 7 | ||||
-rw-r--r-- | backends/platform/dc/dc.h | 2 | ||||
-rw-r--r-- | backends/platform/dc/dcmain.cpp | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/osystem_ds.cpp | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/osystem_ds.h | 2 |
7 files changed, 17 insertions, 6 deletions
diff --git a/backends/audiocd/audiocd.h b/backends/audiocd/audiocd.h index 6eae8e096b..72a01fd87e 100644 --- a/backends/audiocd/audiocd.h +++ b/backends/audiocd/audiocd.h @@ -109,10 +109,9 @@ public: /** * Initialize the specified CD drive for audio playback. - * @param drive the drive id * @return true if the CD drive was inited successfully */ - virtual bool openCD(int drive) = 0; + virtual bool openCD() = 0; /** * Poll CD status. diff --git a/backends/audiocd/default/default-audiocd.cpp b/backends/audiocd/default/default-audiocd.cpp index abf80ac4cd..0c5bb8df03 100644 --- a/backends/audiocd/default/default-audiocd.cpp +++ b/backends/audiocd/default/default-audiocd.cpp @@ -22,6 +22,7 @@ #include "backends/audiocd/default/default-audiocd.h" #include "audio/audiostream.h" +#include "common/config-manager.h" #include "common/system.h" DefaultAudioCDManager::DefaultAudioCDManager() { @@ -152,3 +153,7 @@ DefaultAudioCDManager::Status DefaultAudioCDManager::getStatus() const { info.playing = isPlaying(); return info; } + +bool DefaultAudioCDManager::openCD() { + return openCD(ConfMan.getInt("cdrom")); +} diff --git a/backends/audiocd/default/default-audiocd.h b/backends/audiocd/default/default-audiocd.h index 9e4ba6b33e..1d64690add 100644 --- a/backends/audiocd/default/default-audiocd.h +++ b/backends/audiocd/default/default-audiocd.h @@ -42,6 +42,13 @@ public: void update(); virtual Status getStatus() const; // Subclasses should override for better status results + bool openCD(); + + /** + * Open a CD using the specified drive index + * @param drive The index of the drive + * @note The index is implementation-defined, but 0 is always the best choice + */ virtual bool openCD(int drive) { return false; } virtual void updateCD() {} virtual bool pollCD() const { return false; } diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index d8ab549c3a..80e484f6f8 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -58,7 +58,7 @@ class DCHardware { class DCCDManager : public DefaultAudioCDManager { // Initialize the specified CD drive for audio playback. - bool openCD(int drive); + bool openCD(); // Poll cdrom status // Returns true if cd audio is playing diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp index eede796991..aa8430afc8 100644 --- a/backends/platform/dc/dcmain.cpp +++ b/backends/platform/dc/dcmain.cpp @@ -123,7 +123,7 @@ void DCCDManager::updateCD() // Dummy. The CD drive takes care of itself. } -bool DCCDManager::openCD(int drive) +bool DCCDManager::openCD() { // Dummy. return true; diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index c53f57523d..f23192cd9d 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -715,7 +715,7 @@ void OSystem_DS::deleteMutex(MutexRef mutex) { // and should be replaced by an AudioCDManager subclass, // see backends/audiocd/ and common/system.h -bool OSystem_DS::openCD(int drive) { +bool OSystem_DS::openCD() { return DS::CD::checkCD(); } diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index f4dbac66f7..9b66e24b88 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -130,7 +130,7 @@ public: // FIXME/TODO: The CD API as follows is *obsolete* // and should be replaced by an AudioCDManager subclass, // see backends/audiocd/ and common/system.h - virtual bool openCD(int drive); + virtual bool openCD(); virtual bool pollCD(); virtual void playCD(int track, int num_loops, int start_frame, int duration); virtual void stopCD(); |