Regularized lock and unlock calls on the Graphics and Clock semaphores
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1223 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -65,7 +65,7 @@ int clock_task_func(void* data)
|
||||
* can be halted. (e.g. during battle
|
||||
* or communications)
|
||||
*/
|
||||
SetSemaphore (GLOBAL (GameClock).clock_sem);
|
||||
SetSemaphore (GLOBAL (GameClock.clock_sem));
|
||||
TimeIn = GetTimeCounter ();
|
||||
|
||||
if (GLOBAL (GameClock).tick_count <= 0
|
||||
@@ -165,7 +165,7 @@ int clock_task_func(void* data)
|
||||
LastTime += num_ticks;
|
||||
}
|
||||
|
||||
ClearSemaphore (GLOBAL (GameClock).clock_sem);
|
||||
ClearSemaphore (GLOBAL (GameClock.clock_sem));
|
||||
SleepThreadUntil (TimeIn + ONE_SECOND / 120);
|
||||
}
|
||||
FinishTask (task);
|
||||
|
||||
@@ -271,7 +271,7 @@ InitGlobData (void)
|
||||
// The clock semaphore was initially initialized as '1'
|
||||
// but it is always cleared before set, so it toggled between
|
||||
// 2 and 1, which doesn't actually do anything
|
||||
(GLOBAL (GameClock)).clock_sem = CreateSemaphore(0, "Clock");
|
||||
GLOBAL (GameClock.clock_sem) = CreateSemaphore(0, "Clock");
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user