From d47ab7e9f9adcebd31ca77fa59261d4c372785af Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 8 Aug 2004 15:46:53 +0000 Subject: [PATCH] wait 60s max in debug builds, 15s max in optimized --- stepmania/src/arch/Threads/Threads_Win32.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/stepmania/src/arch/Threads/Threads_Win32.cpp b/stepmania/src/arch/Threads/Threads_Win32.cpp index ad6d1437fd..5076869c98 100644 --- a/stepmania/src/arch/Threads/Threads_Win32.cpp +++ b/stepmania/src/arch/Threads/Threads_Win32.cpp @@ -188,13 +188,18 @@ void SemaImpl_Win32::Post() bool SemaImpl_Win32::Wait() { - int len = 60000; + // In debug builds, some screens may take longer than 15 seconds to load. + // Wait 60 seconds in debug, 15 in optimized. +#ifdef DEBUG + int len = 60000; +#else + int len = 15000; +#endif int tries = 2; while( tries-- ) { - /* Wait for 60 seconds. In debug builds, some screens may take longer - * than 15 seconds to load. If it takes longer than that, we're + /* Wait for 15 seconds. If it takes longer than that, we're * probably deadlocked. */ if( SimpleWaitForSingleObject( sem, len ) ) {