diff options
author | notaz | 2011-06-18 01:23:27 +0300 |
---|---|---|
committer | notaz | 2011-07-08 00:15:06 +0300 |
commit | e64dc4c54e96643522dc4b8c205d143c7d9b2f1d (patch) | |
tree | e62be926fd4fa3e096d4ac8e7c2b475f57e86954 /plugins/dfxvideo | |
parent | 69f0df9cbaed6620a190ac289958c5bf7c079d92 (diff) | |
download | pcsx_rearmed-e64dc4c54e96643522dc4b8c205d143c7d9b2f1d.tar.gz pcsx_rearmed-e64dc4c54e96643522dc4b8c205d143c7d9b2f1d.tar.bz2 pcsx_rearmed-e64dc4c54e96643522dc4b8c205d143c7d9b2f1d.zip |
dfxvideo: decouple from main emu
Diffstat (limited to 'plugins/dfxvideo')
-rw-r--r-- | plugins/dfxvideo/draw_fb.c | 7 | ||||
-rw-r--r-- | plugins/dfxvideo/gpu.c | 19 |
2 files changed, 21 insertions, 5 deletions
diff --git a/plugins/dfxvideo/draw_fb.c b/plugins/dfxvideo/draw_fb.c index b560813..a3f50e8 100644 --- a/plugins/dfxvideo/draw_fb.c +++ b/plugins/dfxvideo/draw_fb.c @@ -9,9 +9,9 @@ #include "gpu.h" -#include "plugin_lib.h" -#include "arm_utils.h" -#include "pcnt.h" +#include "../../frontend/plugin_lib.h" +#include "../../frontend/arm_utils.h" +#include "../../frontend/pcnt.h" // misc globals long lLowerpart; @@ -101,4 +101,3 @@ void CloseDisplay(void) { pl_fbdev_close(); } - diff --git a/plugins/dfxvideo/gpu.c b/plugins/dfxvideo/gpu.c index b384526..9a614de 100644 --- a/plugins/dfxvideo/gpu.c +++ b/plugins/dfxvideo/gpu.c @@ -62,6 +62,7 @@ BOOL bDoLazyUpdate=FALSE; uint32_t lGPUInfoVals[16]; static int iFakePrimBusy=0; static uint32_t vBlank=0; +static const int *skip_advice; //////////////////////////////////////////////////////////////////////// // some misc external display funcs @@ -232,7 +233,8 @@ static void decideSkip(void) if(dwActFixes&0xa0) // -> pc fps calculation fix/old skipping fix { - if((fps_skip < fFrameRateHz) && !bSkipNextFrame) // -> skip max one in a row + int skip = (skip_advice && *skip_advice) || fps_skip < fFrameRateHz; + if(skip && !bSkipNextFrame) // -> skip max one in a row {bSkipNextFrame = TRUE; fps_skip=fFrameRateHz;} else bSkipNextFrame = FALSE; } @@ -1132,3 +1134,18 @@ void CALLBACK GPUvBlank(int val) vBlank=val?0x80000000:0; } +// rearmed thing +#include "../../frontend/plugin_lib.h" + +void GPUrearmedCallbacks(const struct rearmed_cbs *cbs) +{ + // sync config + UseFrameSkip = cbs->frameskip; + iUseDither = cbs->gpu_peops.iUseDither; + dwActFixes = cbs->gpu_peops.dwActFixes; + fFrameRateHz = cbs->gpu_peops.fFrameRateHz; + dwFrameRateTicks = cbs->gpu_peops.dwFrameRateTicks; + + skip_advice = &cbs->fskip_advice; + fps_skip = 100.0f; +} |