aboutsummaryrefslogtreecommitdiff
path: root/backends/timer/psp/timer.h
diff options
context:
space:
mode:
authorCameron Cawley2019-11-27 22:29:38 +0000
committerFilippos Karapetis2019-12-10 08:35:13 +0200
commit099ef8db300fc776539694c766dcb58a4a948952 (patch)
treee48def42571181f7488bb539da3dfd5e312e2b12 /backends/timer/psp/timer.h
parent9dcfe2c09ece2248986af4547e878a07d8ba950f (diff)
downloadscummvm-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/timer/psp/timer.h')
-rw-r--r--backends/timer/psp/timer.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/backends/timer/psp/timer.h b/backends/timer/psp/timer.h
index 45b32e0e14..a7871009c4 100644
--- a/backends/timer/psp/timer.h
+++ b/backends/timer/psp/timer.h
@@ -23,19 +23,16 @@
#ifndef PSP_TIMER_H
#define PSP_TIMER_H
-class PspTimer {
+#include "backends/timer/default/default-timer.h"
+
+class PspTimerManager : public DefaultTimerManager {
public:
- typedef void (* CallbackFunc)(void);
- PspTimer() : _callback(0), _interval(0), _threadId(-1), _init(false) {}
- void stop() { _init = false; }
- bool start();
- ~PspTimer() { stop(); }
- void setCallback(CallbackFunc cb) { _callback = cb; }
- void setIntervalMs(uint32 interval) { _interval = interval * 1000; }
+ PspTimerManager(uint32 interval = 10);
+ ~PspTimerManager() { _init = false; }
+
static int thread(SceSize, void *__this); // static thread to use as bridge
void timerThread();
private:
- CallbackFunc _callback; // pointer to timer callback
uint32 _interval;
int _threadId;
bool _init;