BACKENDS: Added debug output for race condition. Guarded by an #ifdef
This commit is contained in:
parent
ca178f0fd8
commit
75a4e622c2
2 changed files with 33 additions and 1 deletions
|
@ -32,8 +32,16 @@
|
|||
static volatile bool timerInstalled = false;
|
||||
|
||||
static Uint32 timer_handler(Uint32 interval, void *param) {
|
||||
if (!timerInstalled)
|
||||
if (!timerInstalled) {
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("timer_handler: timer is not installed");
|
||||
#endif
|
||||
return interval;
|
||||
}
|
||||
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("timer_handler: called");
|
||||
#endif
|
||||
|
||||
((DefaultTimerManager *)param)->handler();
|
||||
return interval;
|
||||
|
@ -52,9 +60,16 @@ SdlTimerManager::SdlTimerManager() {
|
|||
}
|
||||
|
||||
SdlTimerManager::~SdlTimerManager() {
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("~SdlTimerManager");
|
||||
#endif
|
||||
timerInstalled = false;
|
||||
// Removes the timer callback
|
||||
SDL_RemoveTimer(_timerID);
|
||||
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("~SdlTimerManager: SDL timer removed");
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue