aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotaz2011-01-03 00:14:35 +0200
committernotaz2011-01-03 00:14:35 +0200
commit78d78c3b21fbdc32b73b9e4c9e2719a148c32356 (patch)
treec3ed88439e02ec6bd1876826b154995071e1bd8d
parente7267688b48c7e6619cab3dafe61212b166b389b (diff)
downloadpcsx_rearmed-78d78c3b21fbdc32b73b9e4c9e2719a148c32356.tar.gz
pcsx_rearmed-78d78c3b21fbdc32b73b9e4c9e2719a148c32356.tar.bz2
pcsx_rearmed-78d78c3b21fbdc32b73b9e4c9e2719a148c32356.zip
gpu_unai: basic frameskip
only partially works but oh well
-rw-r--r--frontend/plugin_lib.c3
-rw-r--r--frontend/plugin_lib.h1
-rw-r--r--plugins/dfxvideo/fps.c2
-rw-r--r--plugins/gpu_unai/gpu.cpp10
4 files changed, 14 insertions, 2 deletions
diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c
index d69a0b4..4e65e2e 100644
--- a/frontend/plugin_lib.c
+++ b/frontend/plugin_lib.c
@@ -198,11 +198,14 @@ static void pl_get_layer_pos(int *x, int *y, int *w, int *h)
*h = g_layer_h;
}
+extern int UseFrameSkip; // hmh
+
const struct rearmed_cbs pl_rearmed_cbs = {
pl_get_layer_pos,
pl_fbdev_open,
pl_fbdev_set_mode,
pl_fbdev_flip,
pl_fbdev_close,
+ &UseFrameSkip,
};
diff --git a/frontend/plugin_lib.h b/frontend/plugin_lib.h
index 7a25b81..f5c4985 100644
--- a/frontend/plugin_lib.h
+++ b/frontend/plugin_lib.h
@@ -34,6 +34,7 @@ struct rearmed_cbs {
int (*pl_fbdev_set_mode)(int w, int h, int bpp);
void *(*pl_fbdev_flip)(void);
void (*pl_fbdev_close)(void);
+ int *fskip_option;
};
extern const struct rearmed_cbs pl_rearmed_cbs;
diff --git a/plugins/dfxvideo/fps.c b/plugins/dfxvideo/fps.c
index 2edcd30..b0c87dd 100644
--- a/plugins/dfxvideo/fps.c
+++ b/plugins/dfxvideo/fps.c
@@ -57,7 +57,7 @@ void CheckFrameRate(void)
else // non-skipping mode:
{
if(UseFrameLimit) FrameCap(); // -> do it
- if(ulKeybits&KEY_SHOWFPS) calcfps(); // -> and calc fps display
+ /*if(ulKeybits&KEY_SHOWFPS)*/ calcfps(); // -> and calc fps display
}
}
diff --git a/plugins/gpu_unai/gpu.cpp b/plugins/gpu_unai/gpu.cpp
index 8a13521..fa19b63 100644
--- a/plugins/gpu_unai/gpu.cpp
+++ b/plugins/gpu_unai/gpu.cpp
@@ -911,7 +911,15 @@ void GPU_updateLace(void)
if (!fb_dirty || (GPU_GP1&0x08800000))
return;
- blit();
+ if (!isSkip) {
+ blit();
+
+ fb_dirty = false;
+ if (*cbs->fskip_option)
+ isSkip = true;
+ }
+ else
+ isSkip = false;
}
long GPUopen(unsigned long *, char *, char *)