From bcf39c640cdd2356c0338d4195eb1e63cd17b817 Mon Sep 17 00:00:00 2001 From: dborth Date: Mon, 12 Oct 2009 19:38:49 +0000 Subject: [PATCH] remove callback, correct use of DrawDone --- source/ngc/FreeTypeGX.cpp | 2 -- source/ngc/menu.cpp | 3 +++ source/ngc/video.cpp | 5 +---- 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/menu.cpp b/source/ngc/menu.cpp index 3766ba2..93c7e04 100644 --- a/source/ngc/menu.cpp +++ b/source/ngc/menu.cpp @@ -252,6 +252,7 @@ UpdateGUI (void *arg) if(guiHalt) LWP_SuspendThread(guithread); + UpdatePads(); mainWindow->Draw(); #ifdef HW_RVL @@ -798,6 +799,8 @@ static void WindowCredits(void * ptr) while(!exit) { + UpdatePads(); + if(gameScreenImg) gameScreenImg->Draw(); else diff --git a/source/ngc/video.cpp b/source/ngc/video.cpp index 362d209..f2685ed 100644 --- a/source/ngc/video.cpp +++ b/source/ngc/video.cpp @@ -516,7 +516,6 @@ ResetVideo_Emu () GXRModeObj * rmode = FindVideoMode(); SetupVideoMode(rmode); // reconfigure VI - VIDEO_SetPreRetraceCallback(NULL); // reconfigure GX GX_SetViewport (0, 0, rmode->fbWidth, rmode->efbHeight, 0, 1); @@ -729,7 +728,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}; @@ -792,6 +790,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(); @@ -847,7 +846,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); @@ -886,5 +884,4 @@ 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(); }