mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 11:51:52 +00:00
cleanup
This commit is contained in:
parent
6559f22298
commit
6af090d5c5
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user