aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2007-06-30 21:20:47 +0000
committerMax Horn2007-06-30 21:20:47 +0000
commitdc91dcde00db746a934fe3ebf6094bee9145347b (patch)
tree435fefdc32cd4a28c5a0d9cc9774a4edc38b6ef4 /backends
parent93b1a53c72f1c181439b7dcd43c94d911a2e30ee (diff)
downloadscummvm-rg350-dc91dcde00db746a934fe3ebf6094bee9145347b.tar.gz
scummvm-rg350-dc91dcde00db746a934fe3ebf6094bee9145347b.tar.bz2
scummvm-rg350-dc91dcde00db746a934fe3ebf6094bee9145347b.zip
Adding some missing stuff to the PS2 port (it still will require quite some work to get it working again)
svn-id: r27799
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/ps2/systemps2.cpp10
-rw-r--r--backends/platform/ps2/systemps2.h7
-rw-r--r--backends/platform/psp/osys_psp.h9
3 files changed, 17 insertions, 9 deletions
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index 32290bddea..6572166e91 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -332,6 +332,16 @@ OSystem_PS2::OSystem_PS2(const char *elfPath) {
OSystem_PS2::~OSystem_PS2(void) {
}
+void OSystem_PS2::initBackend() {
+ // FIXME: Should probably move lots of stuff from the constructor to here
+ _mixer = new Audio::Mixer();
+ _timer = new DefaultTimerManager();
+ setSoundCallback(Audio::Mixer::mixCallback, _mixer);
+ setTimerCallback(&timer_handler, 10);
+
+ OSystem::initBackend();
+}
+
void OSystem_PS2::initTimer(void) {
// first setup the two threads that get activated by the timer:
// the timerthread and the soundthread
diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h
index b5c84d3b95..033431a6fd 100644
--- a/backends/platform/ps2/systemps2.h
+++ b/backends/platform/ps2/systemps2.h
@@ -48,6 +48,9 @@ class OSystem_PS2 : public OSystem {
public:
OSystem_PS2(const char *elfPath);
virtual ~OSystem_PS2(void);
+
+ virtual void initBackend();
+
virtual void initSize(uint width, uint height);
virtual int16 getHeight(void);
@@ -103,6 +106,8 @@ public:
virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b);
virtual Common::SaveFileManager *getSavefileManager();
+ virtual Audio::Mixer *getMixer() { return _mixer; }
+ virtual Common::TimerManager *getTimerManager() { return _timer; }
void timerThread(void);
void soundThread(void);
@@ -129,6 +134,8 @@ private:
bool _useMouse, _useKbd, _useHdd, _usbMassLoaded, _usbMassConnected;
Ps2SaveFileManager *_saveManager;
+ Audio::Mixer *_mixer;
+ Common::TimerManager *_timer;
Gs2dScreen *_screen;
Ps2Input *_input;
diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h
index d5d3669a22..7c0932dc20 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -38,15 +38,6 @@ enum GraphicModeID {
CENTERED_362X272
};
-namespace Graphics {
- struct Surface;
-}
-
-namespace Common {
- class SaveFileManager;
- class TimerManager;
-}
-
class OSystem_PSP : public OSystem {
public:
static const OSystem::GraphicsMode s_supportedGraphicsModes[];