[Scummvm-cvs-logs] scummvm master -> f300c172f08c8982e451f7d335792e15cbc7f6b6
CeRiAl
ikhatib at gmail.com
Sun Jun 26 03:46:59 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f300c172f0 WINCE: Fix timer manager
Commit: f300c172f08c8982e451f7d335792e15cbc7f6b6
https://github.com/scummvm/scummvm/commit/f300c172f08c8982e451f7d335792e15cbc7f6b6
Author: CeRiAl (ikhatib at gmail.com)
Date: 2011-06-25T18:44:56-07:00
Commit Message:
WINCE: Fix timer manager
Changed paths:
backends/platform/wince/wince-sdl.cpp
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 9b1ffe8..ec222c6 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -353,9 +353,9 @@ void drawError(char *error) {
}
// ********************************************************************************************
-static DefaultTimerManager *_int_timer = NULL;
static Uint32 timer_handler_wrapper(Uint32 interval) {
- _int_timer->handler();
+ DefaultTimerManager *tm = (DefaultTimerManager *)g_system->getTimerManager();
+ tm->handler();
return interval;
}
@@ -379,21 +379,15 @@ void OSystem_WINCE3::initBackend() {
((WINCESdlEventSource *)_eventSource)->init((WINCESdlGraphicsManager *)_graphicsManager);
-
- // FIXME: This timer manager is *not accesible* from the outside.
- // Instead the timer manager setup by OSystem_SDL is visible on the outside.
- // Since the WinCE backend actually seems to work, my guess is that
- // SDL_AddTimer works after all and the following code is redundant.
- // However it may be, this must be resolved one way or another.
-
- // Create the timer. CE SDL does not support multiple timers (SDL_AddTimer).
+ // Create the timer (but remove the timer manager from the SDL backend first).
+ // CE SDL does not support multiple timers (SDL_AddTimer).
// We work around this by using the SetTimer function, since we only use
// one timer in scummvm (for the time being)
- _int_timer = new DefaultTimerManager();
- //_timerID = NULL; // OSystem_SDL will call removetimer with this, it's ok
+ delete _timerManager;
+ _timerManager = new DefaultTimerManager();
SDL_SetTimer(10, &timer_handler_wrapper);
- // Chain init
+ // Call parent implementation of this method
OSystem_SDL::initBackend();
// Initialize global key mapping
@@ -404,9 +398,6 @@ void OSystem_WINCE3::initBackend() {
GUI_Actions::Instance()->saveMapping(); // write defaults
}
- // Call parent implementation of this method
- //OSystem_SDL::initBackend();
-
_inited = true;
}
More information about the Scummvm-git-logs
mailing list