aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp23
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.h3
2 files changed, 10 insertions, 16 deletions
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index b018c7d378..e6b9aa70ee 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -51,12 +51,22 @@ OSystem_DS::OSystem_DS()
OSystem_DS::~OSystem_DS() {
}
+static int timer_handler(int t)
+{
+ DSTimerManager *tm = (DSTimerManager *)g_system->getTimerManager();
+ tm->handler();
+ return t;
+}
+
void OSystem_DS::initBackend() {
ConfMan.setInt("autosave_period", 0);
ConfMan.setBool("FM_low_quality", true);
_mixer = new DSAudioMixer;
_timer = new DSTimerManager;
+ DS::setSoundProc(Audio::Mixer::mixCallback, _mixer);
+ DS::setTimerCallback(&timer_handler, 10);
+
OSystem::initBackend();
}
@@ -367,12 +377,6 @@ void OSystem_DS::delayMillis(uint msecs)
DS::addEventsToQueue();
}
-void OSystem_DS::setTimerCallback(TimerProc callback, int interval)
-{
-// consolePrintf("Settimercallback interval=%d\n", interval);
- DS::setTimerCallback(callback, interval);
-}
-
OSystem::MutexRef OSystem_DS::createMutex(void)
{
return NULL;
@@ -390,13 +394,6 @@ void OSystem_DS::deleteMutex(MutexRef mutex)
{
}
-bool OSystem_DS::setSoundCallback(SoundProc proc, void *param)
-{
-// consolePrintf("Setsoundcallback");
- DS::setSoundProc(proc, param);
- return true;
-}
-
void OSystem_DS::clearSoundCallback()
{
consolePrintf("Clearing sound callback");
diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h
index b5d191bee9..e3de86fc9b 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -100,14 +100,11 @@ public:
virtual uint32 getMillis();
virtual void delayMillis(uint msecs);
- virtual void setTimerCallback(TimerProc callback, int interval);
-
virtual MutexRef createMutex(void);
virtual void lockMutex(MutexRef mutex);
virtual void unlockMutex(MutexRef mutex);
virtual void deleteMutex(MutexRef mutex);
- virtual bool setSoundCallback(SoundProc proc, void *param);
virtual void clearSoundCallback();
virtual int getOutputSampleRate() const;