aboutsummaryrefslogtreecommitdiff
path: root/backends/base-backend.cpp
diff options
context:
space:
mode:
authorMax Horn2010-11-08 22:53:36 +0000
committerMax Horn2010-11-08 22:53:36 +0000
commit82e473bc3b1498325bad28d804e4314f0c3a528c (patch)
treef186d8b9eeb665a81897deca3a3fadcf74007c16 /backends/base-backend.cpp
parent4242229c91c356bdd90c66ce8c0642488a1b4bf5 (diff)
parent74a53df11b51fa4956745c086b2e6351b8383568 (diff)
downloadscummvm-rg350-82e473bc3b1498325bad28d804e4314f0c3a528c.tar.gz
scummvm-rg350-82e473bc3b1498325bad28d804e4314f0c3a528c.tar.bz2
scummvm-rg350-82e473bc3b1498325bad28d804e4314f0c3a528c.zip
BACKENDS: Partial merge of gsoc2010-opengl: Audio CD changes only
This commit contains the AudioCDManager changes from the gsoc2010-opengl branch. The other changes in that branch are restricted to the backends directory only (plus configure). The Nintendo DS and Dreamcast ports still need to be ported over to the new Audio CD system, but that should be fairly easy to do. svn-id: r54147
Diffstat (limited to 'backends/base-backend.cpp')
-rw-r--r--backends/base-backend.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/backends/base-backend.cpp b/backends/base-backend.cpp
index c06695a727..42ab7b887a 100644
--- a/backends/base-backend.cpp
+++ b/backends/base-backend.cpp
@@ -25,6 +25,7 @@
#include "backends/base-backend.h"
#include "backends/events/default/default-events.h"
+#include "backends/audiocd/default/default-audiocd.h"
#include "gui/message.h"
void BaseBackend::displayMessageOnOSD(const char *msg) {
@@ -71,6 +72,14 @@ void BaseBackend::fillScreen(uint32 col) {
#define DEFAULT_CONFIG_FILE "scummvm.ini"
#endif
+BaseBackend::BaseBackend() {
+ _audiocdManager = 0;
+}
+
+BaseBackend::~BaseBackend() {
+ delete _audiocdManager;
+}
+
Common::SeekableReadStream *BaseBackend::createConfigReadStream() {
Common::FSNode file(DEFAULT_CONFIG_FILE);
return file.createReadStream();
@@ -84,3 +93,15 @@ Common::WriteStream *BaseBackend::createConfigWriteStream() {
return file.createWriteStream();
#endif
}
+
+AudioCDManager *BaseBackend::getAudioCDManager() {
+ if (!_audiocdManager)
+ _audiocdManager = new DefaultAudioCDManager();
+ return _audiocdManager;
+}
+
+void BaseBackend::resetGraphicsScale() {
+ // As a hack, we use 0 here. Backends should override this method
+ // and provide their own.
+ setGraphicsMode(0);
+}