Beispiel #1
0
void updateDisplay(void) // UPDATE DISPLAY
{
    if (PSXDisplay.Disabled) // disable?
    {
        DoClearFrontBuffer(); // -> clear frontbuffer
        return; // -> and bye
    }

    if (dwActFixes & 32) // pc fps calculation fix
    {
        if (UseFrameLimit) PCFrameCap(); // -> brake
        if (UseFrameSkip || ulKeybits & KEY_SHOWFPS)
            PCcalcfps();
    }
    if (ulKeybits & KEY_SHOWFPS) // make fps display buf
    {
        sprintf(szDispBuf, "FPS %06.1f", fps_cur);
    }

    if (iFastFwd) // fastfwd ?
    {
        static int fpscount;
        UseFrameSkip = 1;

        if (!bSkipNextFrame) DoBufferSwap(); // -> to skip or not to skip
        if (fpscount % 6) // -> skip 6/7 frames
            bSkipNextFrame = TRUE;
        else bSkipNextFrame = FALSE;
        fpscount++;
        if (fpscount >= (int) fFrameRateHz) fpscount = 0;
        return;
    }

    if (UseFrameSkip) // skip ?
    {
        if (!bSkipNextFrame) DoBufferSwap(); // -> to skip or not to skip
        if (dwActFixes & 0xa0) // -> pc fps calculation fix/old skipping fix
        {
            if ((fps_skip < fFrameRateHz) && !(bSkipNextFrame)) // -> skip max one in a row
            {
                bSkipNextFrame = TRUE;
                fps_skip = fFrameRateHz;
            } else bSkipNextFrame = FALSE;
        } else FrameSkip();
    } else // no skip ?
    {
        DoBufferSwap(); // -> swap
    }

}
Beispiel #2
0
static void decideSkip(void)
{
 if(!bDoVSyncUpdate)
   return;

 lace_count_since_flip=0;
 fskip_frameReady=!bSkipNextFrame;

 if(dwActFixes&0xa0)                                   // -> pc fps calculation fix/old skipping fix
  {
   if((fps_skip < fFrameRateHz) && !bSkipNextFrame)    // -> skip max one in a row
       {bSkipNextFrame = TRUE; fps_skip=fFrameRateHz;}
   else bSkipNextFrame = FALSE;
  }
 else FrameSkip();
}