From 4caa03e8dd214ddc692c3a94774a0a1ff7457a1c Mon Sep 17 00:00:00 2001 From: ghaushe Date: Mon, 23 Dec 2002 02:29:18 +0000 Subject: [PATCH] Clock Semaphore is now created with a value of '0' -PhracturedBlue git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@471 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 1 + sc2/src/sc2code/init.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index c61dc1c60..2b4ce74c8 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ 0.2: +- Clock semaphore is now created with a value of 0 -PhracturedBlue - Rewrote Semaphore debugging code to be more useful - PhracturedBlue - Better fix for clearing load/save screen - fOSSiL - Implemented bilinear scaling in pure SDL mode - Mika diff --git a/sc2/src/sc2code/init.c b/sc2/src/sc2code/init.c index 2cf684185..c70c70e90 100644 --- a/sc2/src/sc2code/init.c +++ b/sc2/src/sc2code/init.c @@ -264,6 +264,9 @@ InitGlobData (void) GLOBAL (glob_flags) = (BYTE)i; GLOBAL (DisplayArray) = DisplayArray; - (GLOBAL (GameClock)).clock_sem = CreateSemaphore(1, "Clock"); + // 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"); }