diff options
Diffstat (limited to 'backends/platform/psp/osys_psp.cpp')
-rw-r--r-- | backends/platform/psp/osys_psp.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 5f51135a9a..2043a4bef2 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -60,9 +60,9 @@ static int timer_handler(int t) { void OSystem_PSP::initSDL() { #ifdef USE_PSP_AUDIO - SDL_Init(SDL_INIT_TIMER); + SDL_Init(0); #else - SDL_Init(SDL_INIT_AUDIO | SDL_INIT_TIMER); + SDL_Init(SDL_INIT_AUDIO); #endif } @@ -90,7 +90,7 @@ void OSystem_PSP::initBackend() { _inputHandler.init(); initSDL(); - + _savefile = new PSPSaveFileManager; _timer = new DefaultTimerManager(); @@ -298,17 +298,18 @@ bool OSystem_PSP::pollEvent(Common::Event &event) { return _inputHandler.getAllInputs(event); } - uint32 OSystem_PSP::getMillis() { - return SDL_GetTicks(); + return _pspRtc.getMillis(); } void OSystem_PSP::delayMillis(uint msecs) { - SDL_Delay(msecs); + PspThread::delayMillis(msecs); } void OSystem_PSP::setTimerCallback(TimerProc callback, int interval) { - SDL_SetTimer(interval, (SDL_TimerCallback)callback); + _pspTimer.setCallback((PspTimer::CallbackFunc)callback); + _pspTimer.setIntervalMs(interval); + _pspTimer.start(); } OSystem::MutexRef OSystem_PSP::createMutex(void) { |