mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-06 02:20:25 +00:00
Fix to prevent SUB _GL from consuming all runtime resources when it cannot meet _FPS (or assumed _FPS) demands
This commit is contained in:
parent
dcaf43a493
commit
f1938b5b01
|
@ -28477,6 +28477,7 @@ void sub__maptriangle(int32 cull_options,float sx1,float sy1,float sx2,float sy2
|
||||||
#ifdef QB64_GLUT
|
#ifdef QB64_GLUT
|
||||||
glutPostRedisplay();
|
glutPostRedisplay();
|
||||||
int32 msdelay=1000.0/max_fps;
|
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;
|
if (msdelay<1) msdelay=1;
|
||||||
glutTimerFunc(msdelay,GLUT_TIMER_EVENT,0);
|
glutTimerFunc(msdelay,GLUT_TIMER_EVENT,0);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue