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:
mcmartin
2003-09-13 06:10:10 +00:00
parent f198ca6d11
commit e71c28744c
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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