aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus/timers.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/pegasus/timers.h')
-rw-r--r--engines/pegasus/timers.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/pegasus/timers.h b/engines/pegasus/timers.h
index 1dd32de3c9..5a269c2830 100644
--- a/engines/pegasus/timers.h
+++ b/engines/pegasus/timers.h
@@ -28,6 +28,7 @@
#include "common/list.h"
#include "common/rational.h"
+#include "common/func.h"
#include "pegasus/constants.h"
#include "pegasus/notification.h"
@@ -242,13 +243,16 @@ protected:
Notification _fuseNotification;
};
-class FuseFunction : public Fuse, public FunctionPtr {
+class FuseFunction : public Fuse {
public:
- FuseFunction() {}
- virtual ~FuseFunction() {}
+ FuseFunction() : _functor(0) {}
+ virtual ~FuseFunction() { delete _functor; }
+ void setFunctor(Common::Functor0<void> *functor) { delete _functor; _functor = functor; }
protected:
- virtual void invokeAction() { callFunction(); }
+ virtual void invokeAction() { if (_functor && _functor->isValid()) (*_functor)(); }
+
+ Common::Functor0<void> *_functor;
};
} // End of namespace Pegasus