diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index 64e17b5c5..60f10c871 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -1478,6 +1478,15 @@ static void execHardware_hstart() nds.VCount++; + //end of 3d vblank + //this should be 214, but we are going to be generous for games with tight timing + //they shouldnt be changing any textures at 262 but they might accidentally still be at 214 + //so.. + if(CommonSettings.rigorous_timing && nds.VCount==214 || !CommonSettings.rigorous_timing && nds.VCount==262) + { + gfx3d_VBlankEndSignal(frameSkipper.ShouldSkip3D()); + } + if(nds.VCount==263) { nds.VCount=0; @@ -1515,16 +1524,6 @@ static void execHardware_hstart() //it may not be necessary. triggerDma(EDMAMode_MemDisplay); } - - - //end of 3d vblank - //this should be 214, but we are going to be generous for games with tight timing - //they shouldnt be changing any textures at 262 but they might accidentally still be at 214 - //so.. - if(CommonSettings.rigorous_timing && nds.VCount==214 || !CommonSettings.rigorous_timing && nds.VCount==262) - { - gfx3d_VBlankEndSignal(frameSkipper.ShouldSkip3D()); - } } void NDS_Reschedule() diff --git a/desmume/src/NDSSystem.h b/desmume/src/NDSSystem.h index d90aab7f7..ff657064e 100644 --- a/desmume/src/NDSSystem.h +++ b/desmume/src/NDSSystem.h @@ -493,6 +493,7 @@ extern struct TCommonSettings { , spuInterpolationMode(SPUInterpolation_Linear) , manualBackupType(0) , spu_advanced(false) + , rigorous_timing(false) { strcpy(ARM9BIOS, "biosnds9.bin"); strcpy(ARM7BIOS, "biosnds7.bin");