This commit is contained in:
Pawel Kolodziejski 2004-03-27 14:52:31 +00:00
parent 6559f22298
commit 6af090d5c5
3 changed files with 2 additions and 12 deletions

View File

@ -50,7 +50,6 @@ Smush::Smush() {
_movieTime = 0;
_surface = NULL;
_bufSurface = NULL;
_timerMutex = g_timer->getMutex();
}
Smush::~Smush() {
@ -78,15 +77,11 @@ void Smush::init() {
_buf = (byte *)_bufSurface->pixels;
}
while (g_timerCallbackRunning) {};
g_timerLock = true;
g_timer->installTimerProc(&timerCallback, _speed, NULL);
g_timerLock = false;
}
void Smush::deinit() {
g_timer->removeTimerProc(&timerCallback);
g_timerLock = false;
_videoFinished = true;
_videoPause = true;

View File

@ -118,8 +118,8 @@ bool Timer::installTimerProc(TimerProc procedure, int32 interval, void *refCon)
assert(interval > 0);
StackLock lock(_mutex);
while (g_timerCallbackRunning) {};
g_timerLock = true;
while (g_timerCallbackRunning) {};
for (int l = 0; l < MAX_TIMERS; l++) {
if (!_timerSlots[l].procedure) {
@ -141,8 +141,8 @@ bool Timer::installTimerProc(TimerProc procedure, int32 interval, void *refCon)
void Timer::removeTimerProc(TimerProc procedure) {
StackLock lock(_mutex);
while (g_timerCallbackRunning) {};
g_timerLock = true;
while (g_timerCallbackRunning) {};
for (int l = 0; l < MAX_TIMERS; l++) {
if (_timerSlots[l].procedure == procedure) {
@ -155,7 +155,3 @@ void Timer::removeTimerProc(TimerProc procedure) {
g_timerLock = false;
}
MutexRef Timer::getMutex() {
return _mutex;
}

View File

@ -63,7 +63,6 @@ public:
*/
void removeTimerProc(TimerProc proc);
MutexRef getMutex();
protected:
static int timer_handler(int t);
int handler(int t);