bbosen - 2022-10-19

Version Lac08p79 of Linux Air Combat included a frame-rate limiter intended to help very very powerful computers run LAC at 60FPS, preventing them from running so excessively fast that wierd graphical and flight model anomalies became apparent.

The Raspberry Pi doesn't need that frame rate limiter, and we had to disable it to prevent it from kicking in on occasion. To do that, in the Raspbian version for Lac08p87, we went into main.cpp's "TimerGame()" function and changed THIS little block of code:

// On some systems, LAC runs too fast and must be slowed down.
// We do that here.
//sprintf (DebugBuf, "TimerGame(): dt = %d.", dt);
//display (DebugBuf, LOG_MOST);
if (dt < 17)
   {
   //display ("TimerGame(): Too fast. Invokng SDL_Delay().", LOG_MOST);
   SDL_Delay (24 - dt);
   }

to THIS:

// On some systems, LAC runs too fast and must be slowed down.
// We do that here.
//sprintf (DebugBuf, "TimerGame(): dt = %d.", dt);
//display (DebugBuf, LOG_MOST);
if (dt < 10)
   {
   //display ("TimerGame(): Too fast. Invokng SDL_Delay().", LOG_MOST);
   SDL_Delay (17 - dt);
   }

As you can see, only two integers were changed. The effect of the change is to disable the frame-rate limiter unless the frame rate jumps WAY too high (which never happens on the Raspberry Pi).

As a consequence of this change, LAC can once again be tuned to run very smoothly on the Raspberry Pi at video resolutions of 1280x720 and lower. Without that change, players saw little graphical "glitches" from time to time when the frame rate limiter kicked in.

(We intend to incorporate this change into all Raspberry Pi versions in the future.)