7 static uint64 desiredfps;
9 void RefreshThrottleFPS(void)
11 desiredfps=FCEUI_GetDesiredFPS()>>8;
13 tfreq<<=16; /* Adjustment for fps returned from FCEUI_GetDesiredFPS(). */
16 static uint64 GetCurTime(void)
22 ret=(uint64)tv.tv_sec*1000000;
27 void SpeedThrottle(void)
29 static uint64 ttime,ltime;
35 if( (ttime-ltime) < (tfreq/desiredfps) )
40 if( (ttime-ltime) >= (tfreq*4/desiredfps))
43 ltime+=tfreq/desiredfps;