Added back manual frameskip due to forum request

This commit is contained in:
ptitSeb 2014-08-18 21:26:03 +02:00
parent 387bf0a960
commit 891c0011bb
3 changed files with 11 additions and 4 deletions

View File

@ -71,9 +71,6 @@ int max_idx,max_mvo,max_op,max_pt,max_tr,max_vtx,max_modt, ovrn;
TA_context* _pvrrc; TA_context* _pvrrc;
void SetREP(TA_context* cntx); void SetREP(TA_context* cntx);
int frameskip=0;
bool FrameSkipping=false; // global switch to enable/disable frameskip
bool rend_single_frame() bool rend_single_frame()
{ {
//wait render start only if no frame pending //wait render start only if no frame pending

View File

@ -4,6 +4,9 @@
extern u32 fskip; extern u32 fskip;
extern u32 FrameCount; extern u32 FrameCount;
int frameskip=0;
bool FrameSkipping=false; // global switch to enable/disable frameskip
TA_context* ta_ctx; TA_context* ta_ctx;
tad_context ta_tad; tad_context ta_tad;
@ -75,6 +78,13 @@ bool QueueRender(TA_context* ctx)
{ {
verify(ctx != 0); verify(ctx != 0);
if (FrameSkipping && frameskip) {
frameskip=1-frameskip;
tactx_Recycle(ctx);
fskip++;
return false;
}
if (rqueue) { if (rqueue) {
tactx_Recycle(ctx); tactx_Recycle(ctx);
fskip++; fskip++;

View File

@ -1169,7 +1169,7 @@ _end:
//Small-n-simple idle loop detector :p //Small-n-simple idle loop detector :p
if (state.info.has_readm && !state.info.has_writem && !state.info.has_fpu && blk->guest_opcodes<6) if (state.info.has_readm && !state.info.has_writem && !state.info.has_fpu && blk->guest_opcodes<6)
{ {
if ((blk->BlockType==BET_Cond_0 || blk->BlockType==BET_Cond_1) && blk->BranchBlock<=blk->addr) if (blk->BlockType==BET_Cond_0 || blk->BlockType==BET_Cond_1 && blk->BranchBlock<=blk->addr)
{ {
blk->guest_cycles*=3; blk->guest_cycles*=3;
} }