X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=frontend%2Fplugin_lib.c;h=248177943a11b6774b1df1e24242d537f5317b5c;hb=916a765bb0a5516ce681c83f479c668b0ef8473f;hp=287b55109fcc8afbbcea349366cf404924ceb336;hpb=7c0f51de89955f60f5c7304ab8c4a8f8e9b7f185;p=pcsx_rearmed.git diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index 287b5510..24817794 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -31,6 +31,9 @@ int keystate; static int pl_fbdev_w, pl_fbdev_h, pl_fbdev_bpp; static int flip_cnt, vsync_cnt, flips_per_sec, tick_per_sec; static float vsps_cur; +// P.E.Op.S. +extern int UseFrameSkip; +extern float fps_skip; static int get_cpu_ticks(void) { @@ -192,6 +195,10 @@ void pl_frame_limit(void) //printf("usleep %d\n", diff - pl_frame_interval / 2); usleep(diff - pl_frame_interval / 2); } + else if (diff < 0 && UseFrameSkip) { + // P.E.Op.S. makes skip decision based on this + fps_skip = 1000000.0f / (float)-diff; + } } pcnt_start(PCNT_ALL);