From f1938b5b0120d1b2a3d1628f20a6aaabd5a0e79b Mon Sep 17 00:00:00 2001 From: Galleon Date: Wed, 21 Jan 2015 04:51:58 -0800 Subject: [PATCH] Fix to prevent SUB _GL from consuming all runtime resources when it cannot meet _FPS (or assumed _FPS) demands --- internal/c/libqb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index 17cb05c03..474449db8 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -28477,6 +28477,7 @@ void sub__maptriangle(int32 cull_options,float sx1,float sy1,float sx2,float sy2 #ifdef QB64_GLUT glutPostRedisplay(); int32 msdelay=1000.0/max_fps; + Sleep(4); msdelay-=4;//this forces GLUT to relinquish some CPU time to other threads but still allow for _FPS 100+ if (msdelay<1) msdelay=1; glutTimerFunc(msdelay,GLUT_TIMER_EVENT,0); #endif