Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost/intern/GHOST_SystemWin32.cpp')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 6f9bad0f876..61b504400d2 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -190,11 +190,12 @@ bool GHOST_SystemWin32::processEvents(bool waitForEvent)
::Sleep(1);
#else
GHOST_TUns64 next = timerMgr->nextFireTime();
+ GHOST_TInt64 maxSleep = next - getMilliSeconds();
if (next == GHOST_kFireTimeNever) {
::WaitMessage();
- } else {
- ::SetTimer(NULL, 0, next - getMilliSeconds(), NULL);
+ } else if(maxSleep >= 0.0) {
+ ::SetTimer(NULL, 0, maxSleep, NULL);
::WaitMessage();
::KillTimer(NULL, 0);
}