diff options
Diffstat (limited to 'libretro.c')
-rw-r--r-- | libretro.c | 43 |
1 files changed, 23 insertions, 20 deletions
@@ -400,46 +400,49 @@ void retro_run(void) samples_to_play -= (int)samples_to_play; } - -// samples_to_play = 0; +#ifdef FRAMESKIP + if (IPPU.RenderThisFrame) + { +#endif #ifdef PSP - static unsigned int __attribute__((aligned(16))) d_list[32]; - void* const texture_vram_p = (void*)(0x44200000 - (512 * - 512)); // max VRAM address - frame size + static unsigned int __attribute__((aligned(16))) d_list[32]; + void* const texture_vram_p = (void*)(0x44200000 - (512 * + 512)); // max VRAM address - frame size - sceKernelDcacheWritebackRange(GFX.Screen, GFX.Pitch * IPPU.RenderedScreenHeight); + sceKernelDcacheWritebackRange(GFX.Screen, GFX.Pitch * IPPU.RenderedScreenHeight); - sceGuStart(GU_DIRECT, d_list); + sceGuStart(GU_DIRECT, d_list); - sceGuCopyImage(GU_PSM_4444, 0, 0, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch >> 1, GFX.Screen, 0, - 0, - 512, texture_vram_p); + sceGuCopyImage(GU_PSM_4444, 0, 0, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch >> 1, GFX.Screen, 0, + 0, + 512, texture_vram_p); - sceGuTexSync(); - sceGuTexImage(0, 512, 512, 512, texture_vram_p); - sceGuTexMode(GU_PSM_5551, 0, 0, GU_FALSE); - sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGB); - sceGuDisable(GU_BLEND); + sceGuTexSync(); + sceGuTexImage(0, 512, 512, 512, texture_vram_p); + sceGuTexMode(GU_PSM_5551, 0, 0, GU_FALSE); + sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGB); + sceGuDisable(GU_BLEND); - sceGuFinish(); + sceGuFinish(); - video_cb(texture_vram_p, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch); + video_cb(texture_vram_p, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch); #else - video_cb(GFX.Screen, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch); + video_cb(GFX.Screen, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch); #endif #ifdef FRAMESKIP - if (IPPU.RenderThisFrame) IPPU.RenderThisFrame = false; + } else { - video_cb(NULL, 256, 224, GFX.Pitch); + video_cb(NULL, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch); IPPU.RenderThisFrame = true; } #endif + // if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE, &updated) && updated) // check_variables(); |