From 49701e37f5cda921629957f2e7278263a8ab1564 Mon Sep 17 00:00:00 2001 From: dborth Date: Mon, 12 Oct 2009 19:24:54 +0000 Subject: [PATCH] remove callback, correct use of DrawDone --- source/ngc/FreeTypeGX.cpp | 2 -- source/ngc/gcvideo.cpp | 5 +---- source/ngc/menu.cpp | 3 +++ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/source/ngc/FreeTypeGX.cpp b/source/ngc/FreeTypeGX.cpp index 5a004ed..5cedd4b 100644 --- a/source/ngc/FreeTypeGX.cpp +++ b/source/ngc/FreeTypeGX.cpp @@ -678,7 +678,6 @@ void FreeTypeGX::copyTextureToFramebuffer(GXTexObj *texObj, f32 texWidth, f32 te GX_Color4u8(color.r, color.g, color.b, color.a); GX_TexCoord2f32(0.0f, 1.0f); GX_End(); - GX_DrawDone(); this->setDefaultMode(); } @@ -712,7 +711,6 @@ void FreeTypeGX::copyFeatureToFramebuffer(f32 featureWidth, f32 featureHeight, i GX_Position2s16(screenX, featureHeight + screenY); GX_Color4u8(color.r, color.g, color.b, color.a); GX_End(); - GX_DrawDone(); this->setDefaultMode(); } diff --git a/source/ngc/gcvideo.cpp b/source/ngc/gcvideo.cpp index c3d132a..bd3319d 100644 --- a/source/ngc/gcvideo.cpp +++ b/source/ngc/gcvideo.cpp @@ -635,7 +635,6 @@ ResetVideo_Emu () rmode = FindVideoMode(); SetupVideoMode(rmode); // reconfigure VI - VIDEO_SetPreRetraceCallback(NULL); GXColor background = {0, 0, 0, 255}; GX_SetCopyClear (background, 0x00ffffff); @@ -876,7 +875,6 @@ ResetVideo_Menu () GXRModeObj * rmode = FindVideoMode(); SetupVideoMode(rmode); // reconfigure VI - VIDEO_SetPreRetraceCallback((VIRetraceCallback)UpdatePads); // clears the bg to color and clears the z buffer GXColor background = {0, 0, 0, 255}; @@ -939,6 +937,7 @@ void Menu_Render() GX_SetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); GX_SetColorUpdate(GX_TRUE); GX_CopyDisp(xfb[whichfb],GX_TRUE); + GX_DrawDone(); VIDEO_SetNextFramebuffer(xfb[whichfb]); VIDEO_Flush(); VIDEO_WaitVSync(); @@ -994,7 +993,6 @@ void Menu_DrawImg(f32 xpos, f32 ypos, u16 width, u16 height, u8 data[], GX_Color4u8(0xFF,0xFF,0xFF,alpha); GX_TexCoord2f32(0, 1); GX_End(); - GX_DrawDone(); GX_LoadPosMtxImm (GXmodelView2D, GX_PNMTX0); GX_SetTevOp (GX_TEVSTAGE0, GX_PASSCLR); @@ -1033,7 +1031,6 @@ void Menu_DrawRectangle(f32 x, f32 y, f32 width, f32 height, GXColor color, u8 f GX_Color4u8(color.r, color.g, color.b, color.a); } GX_End(); - GX_DrawDone(); } /**************************************************************************** diff --git a/source/ngc/menu.cpp b/source/ngc/menu.cpp index eeb11be..f4aabdd 100644 --- a/source/ngc/menu.cpp +++ b/source/ngc/menu.cpp @@ -266,6 +266,7 @@ UpdateGUI (void *arg) if(guiHalt) LWP_SuspendThread(guithread); + UpdatePads(); mainWindow->Draw(); #ifdef HW_RVL @@ -840,6 +841,8 @@ static void WindowCredits(void * ptr) while(!exit) { + UpdatePads(); + if(gameScreenImg) gameScreenImg->Draw(); else