aboutsummaryrefslogtreecommitdiff
path: root/backends/timer/sdl/sdl-timer.cpp
diff options
context:
space:
mode:
authorAlejandro Marzini2010-07-03 00:13:45 +0000
committerAlejandro Marzini2010-07-03 00:13:45 +0000
commitfda9416cc8b64fa7371b7a9989def9cc318efc7e (patch)
tree2cdb4c6714e0cb8bbcd6ea03c5b467b6ade50e4b /backends/timer/sdl/sdl-timer.cpp
parentf9c3a4547cbf1b1942402d618fa403a7fb1cb656 (diff)
downloadscummvm-rg350-fda9416cc8b64fa7371b7a9989def9cc318efc7e.tar.gz
scummvm-rg350-fda9416cc8b64fa7371b7a9989def9cc318efc7e.tar.bz2
scummvm-rg350-fda9416cc8b64fa7371b7a9989def9cc318efc7e.zip
Cleanup and documentation.
svn-id: r50609
Diffstat (limited to 'backends/timer/sdl/sdl-timer.cpp')
-rw-r--r--backends/timer/sdl/sdl-timer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/timer/sdl/sdl-timer.cpp b/backends/timer/sdl/sdl-timer.cpp
index 0fbe12589e..94932d61ba 100644
--- a/backends/timer/sdl/sdl-timer.cpp
+++ b/backends/timer/sdl/sdl-timer.cpp
@@ -34,14 +34,17 @@ static Uint32 timer_handler(Uint32 interval, void *param) {
}
SdlTimerManager::SdlTimerManager() {
+ // Initializes the SDL timer subsystem
if (SDL_InitSubSystem(SDL_INIT_TIMER) == -1) {
error("Could not initialize SDL: %s", SDL_GetError());
}
+ // Creates the timer callback
_timerID = SDL_AddTimer(10, &timer_handler, this);
}
SdlTimerManager::~SdlTimerManager() {
+ // Removes the timer callback
SDL_RemoveTimer(_timerID);
}