Code cleanup, found that rendering of openGL graphics are limiting the max frame speed to 60 hz. Have not solution for it yet.

This commit is contained in:
Matthew Budd 2020-06-13 20:07:01 -04:00
parent b4b2cca9ec
commit a1c0e86026
2 changed files with 15 additions and 4 deletions

View File

@ -75,9 +75,13 @@ SpeedThrottle()
else
InFrame = 0;
/*fprintf(stderr, "attempting to sleep %Ld ms, frame complete=%s\n",
time_left, InFrame?"no":"yes");*/
SDL_Delay(time_left);
//fprintf(stderr, "attempting to sleep %Ld ms, frame complete=%s\n",
// time_left, InFrame?"no":"yes");
if ( time_left > 0 )
{
SDL_Delay(time_left);
}
if(!InFrame)
{

View File

@ -911,11 +911,18 @@ int main(int argc, char *argv[])
while(1)
{
if(GameInfo)
{
DoFun(frameskip, periodic_saves);
}
else
{
SDL_Delay(1);
}
while(gtk_events_pending())
gtk_main_iteration_do(FALSE);
{
gtk_main_iteration_do(FALSE);
}
}
}
else