From 2cd24b54b0f4beba4ba55f9ea88c64193c323e6e Mon Sep 17 00:00:00 2001 From: bobode Date: Wed, 30 Oct 2013 04:04:00 +0000 Subject: [PATCH] tweak to avoid script pauses and deadlocks --- D2BS.h | 2 +- D2Handlers.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/D2BS.h b/D2BS.h index 29d2bbb7..e0315b54 100644 --- a/D2BS.h +++ b/D2BS.h @@ -5,7 +5,7 @@ #define XP_WIN -#define D2BS_VERSION "1.5.1804" //uptodate with d branch 1765 ff 20b +#define D2BS_VERSION "1.5.1805" //uptodate with d branch 1765 ff 20b #include #include diff --git a/D2Handlers.cpp b/D2Handlers.cpp index 1e40c22f..7721b840 100644 --- a/D2Handlers.cpp +++ b/D2Handlers.cpp @@ -475,8 +475,8 @@ void CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) else Vars.bGameLoopEntered = true; - while(Vars.SectionCount) - Sleep(0); + if(Vars.SectionCount) + Sleep(5); EnterCriticalSection(&Vars.cGameLoopSection); }