This commit is contained in:
dborth 2010-04-05 23:16:37 +00:00
parent 923667cecc
commit 6fd3ad84ff

View File

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