diff --git a/source/video.cpp b/source/video.cpp index 979b32c..5b90140 100644 --- a/source/video.cpp +++ b/source/video.cpp @@ -401,7 +401,6 @@ InitializeVideo () GX_SetCopyClear (background, 0x00ffffff); GX_SetDispCopyGamma (GX_GM_1_0); GX_SetCullMode (GX_CULL_NONE); - GX_SetDrawDoneCallback(VIDEO_Flush); GX_CopyDisp (xfb[whichfb], GX_TRUE); // reset xfb GX_Flush(); @@ -580,8 +579,6 @@ void GX_Render(int width, int height, u8 * buffer, int pitch) int vwid2 = (vwidth >> 2); char *ra = NULL; - GX_WaitDrawDone(); - // Ensure previous vb has complete while ((LWP_ThreadIsSuspended (vbthread) == 0) || (copynow == GX_TRUE)) usleep (50); @@ -637,7 +634,7 @@ void GX_Render(int width, int height, u8 * buffer, int pitch) #ifdef HW_RVL draw_cursor(view); // render cursor #endif - GX_SetDrawDone(); + GX_DrawDone(); if(ScreenshotRequested) { @@ -648,6 +645,7 @@ void GX_Render(int width, int height, u8 * buffer, int pitch) // EFB is ready to be copied into XFB VIDEO_SetNextFramebuffer(xfb[whichfb]); + VIDEO_Flush(); copynow = GX_TRUE; // Return to caller, don't waste time waiting for vb @@ -752,20 +750,16 @@ ResetVideo_Menu () * * Renders everything current sent to GX, and flushes video ***************************************************************************/ -static bool firstFrame = true; - void Menu_Render() { - if(!firstFrame) - GX_WaitDrawDone(); whichfb ^= 1; // flip framebuffer GX_SetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); GX_SetColorUpdate(GX_TRUE); GX_CopyDisp(xfb[whichfb],GX_TRUE); - GX_SetDrawDone(); + GX_DrawDone(); VIDEO_SetNextFramebuffer(xfb[whichfb]); + VIDEO_Flush(); VIDEO_WaitVSync(); - firstFrame = false; } /****************************************************************************