diff options
author | Cameron Cawley | 2019-11-27 22:29:38 +0000 |
---|---|---|
committer | Filippos Karapetis | 2019-12-10 08:35:13 +0200 |
commit | 099ef8db300fc776539694c766dcb58a4a948952 (patch) | |
tree | e48def42571181f7488bb539da3dfd5e312e2b12 /backends/platform/psp | |
parent | 9dcfe2c09ece2248986af4547e878a07d8ba950f (diff) | |
download | scummvm-rg350-099ef8db300fc776539694c766dcb58a4a948952.tar.gz scummvm-rg350-099ef8db300fc776539694c766dcb58a4a948952.tar.bz2 scummvm-rg350-099ef8db300fc776539694c766dcb58a4a948952.zip |
PSP: Make the PspTimer class a subclass of DefaultTimerManager
Diffstat (limited to 'backends/platform/psp')
-rw-r--r-- | backends/platform/psp/osys_psp.cpp | 18 | ||||
-rw-r--r-- | backends/platform/psp/osys_psp.h | 6 |
2 files changed, 2 insertions, 22 deletions
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 2febf91b04..f09e8498d2 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -39,7 +39,7 @@ #include "backends/platform/psp/rtc.h" #include "backends/saves/default/default-saves.h" -#include "backends/timer/default/default-timer.h" +#include "backends/timer/psp/timer.h" #include "graphics/surface.h" #include "audio/mixer_intern.h" @@ -50,12 +50,6 @@ #define SAMPLES_PER_SEC 44100 -static int timer_handler(int t) { - DefaultTimerManager *tm = (DefaultTimerManager *)g_system->getTimerManager(); - tm->handler(); - return t; -} - OSystem_PSP::~OSystem_PSP() {} #define PSP_SCREEN_WIDTH 480 @@ -97,13 +91,11 @@ void OSystem_PSP::initBackend() { _savefileManager = new DefaultSaveFileManager(PSP_DEFAULT_SAVE_PATH); - _timerManager = new DefaultTimerManager(); + _timerManager = new PspTimerManager(); PSP_DEBUG_PRINT("calling keyboard.load()\n"); _keyboard.load(); // Load virtual keyboard files into memory - setTimerCallback(&timer_handler, 10); - setupMixer(); EventsBaseBackend::initBackend(); @@ -358,12 +350,6 @@ void OSystem_PSP::delayMillis(uint msecs) { PspThread::delayMillis(msecs); } -void OSystem_PSP::setTimerCallback(TimerProc callback, int interval) { - _pspTimer.setCallback((PspTimer::CallbackFunc)callback); - _pspTimer.setIntervalMs(interval); - _pspTimer.start(); -} - OSystem::MutexRef OSystem_PSP::createMutex(void) { return (MutexRef) new PspMutex(true); // start with a full mutex } diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h index ff9dd101d2..80f68329d8 100644 --- a/backends/platform/psp/osys_psp.h +++ b/backends/platform/psp/osys_psp.h @@ -39,7 +39,6 @@ #include "backends/platform/psp/display_manager.h" #include "backends/platform/psp/input.h" #include "backends/platform/psp/audio.h" -#include "backends/timer/psp/timer.h" #include "backends/platform/psp/thread.h" class OSystem_PSP : public EventsBaseBackend, public PaletteManager { @@ -57,7 +56,6 @@ private: PSPKeyboard _keyboard; InputHandler _inputHandler; PspAudio _audio; - PspTimer _pspTimer; ImageViewer _imageViewer; public: @@ -127,10 +125,6 @@ public: uint32 getMillis(bool skipRecord = false); void delayMillis(uint msecs); - // Timer - typedef int (*TimerProc)(int interval); - void setTimerCallback(TimerProc callback, int interval); - // Mutex MutexRef createMutex(void); void lockMutex(MutexRef mutex); |