From 886c4e54175317e57880e59eafbbe835ea77f754 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 7 Jun 2011 10:52:04 +0200 Subject: DS: Use OSystem's 'slot' for timer manager --- backends/platform/ds/arm9/source/osystem_ds.cpp | 7 +++---- backends/platform/ds/arm9/source/osystem_ds.h | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'backends/platform/ds') diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index eab9fd6a33..6cc76f51a5 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -42,6 +42,7 @@ #include "backends/fs/ds/ds-fs-factory.h" #include "backends/audiocd/default/default-audiocd.h" +#include "backends/timer/default/default-timer.h" #ifdef ENABLE_AGI #include "wordcompletion.h" @@ -81,7 +82,7 @@ OSystem_DS *OSystem_DS::_instance = NULL; OSystem_DS::OSystem_DS() - : eventNum(0), lastPenFrame(0), queuePos(0), _mixer(NULL), _timer(NULL), _frameBufferExists(false), + : eventNum(0), lastPenFrame(0), queuePos(0), _mixer(NULL), _frameBufferExists(false), _disableCursorPalette(true), _graphicsEnable(true), _gammaValue(0) { // eventNum = 0; @@ -89,13 +90,11 @@ OSystem_DS::OSystem_DS() // queuePos = 0; _instance = this; // _mixer = NULL; - // _timer = NULL; //_frameBufferExists = false; } OSystem_DS::~OSystem_DS() { delete _mixer; - delete _timer; } int OSystem_DS::timerHandler(int t) { @@ -108,7 +107,7 @@ void OSystem_DS::initBackend() { ConfMan.setInt("autosave_period", 0); ConfMan.setBool("FM_medium_quality", true); - _timer = new DefaultTimerManager(); + _timerManager = new DefaultTimerManager(); DS::setTimerCallback(&OSystem_DS::timerHandler, 10); if (ConfMan.hasKey("22khzaudio", "ds") && ConfMan.getBool("22khzaudio", "ds")) { diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index 1e032ba2cf..ad306b5e3b 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -29,7 +29,6 @@ #include "nds.h" #include "gbampsave.h" #include "backends/saves/default/default-saves.h" -#include "backends/timer/default/default-timer.h" #include "audio/mixer_intern.h" #include "graphics/surface.h" #include "graphics/colormasks.h" @@ -46,7 +45,6 @@ protected: GBAMPSaveFileManager mpSaveManager; Audio::MixerImpl *_mixer; - DefaultTimerManager *_timer; Graphics::Surface _framebuffer; bool _frameBufferExists; bool _graphicsEnable; @@ -159,7 +157,6 @@ public: virtual Audio::Mixer *getMixer() { return _mixer; } Audio::MixerImpl *getMixerImpl() { return _mixer; } - virtual Common::TimerManager *getTimerManager() { return _timer; } static int timerHandler(int t); -- cgit v1.2.3