mirror of
https://github.com/extremscorner/not64.git
synced 2024-05-29 01:07:58 -04:00
Improvements to VI timing. Preserve DEBUG on screen when displaying load icon.
This commit is contained in:
parent
02d3207966
commit
30c1e0611b
|
@ -601,6 +601,11 @@ void FrameBuffer_RestoreBuffer( u32 address, u16 size, u16 width )
|
|||
}
|
||||
current = current->lower;
|
||||
}
|
||||
#ifndef __GX__
|
||||
//No framebuffer was found
|
||||
float color[4] = {0.0f,0.0f,0.0f,0.0f};
|
||||
OGL_ClearColorBuffer( color );
|
||||
#endif //!__GX__
|
||||
}
|
||||
|
||||
FrameBuffer *FrameBuffer_FindBuffer( u32 address )
|
||||
|
|
|
@ -127,7 +127,6 @@ void VI_UpdateScreen()
|
|||
//Only render N64 framebuffer in RDRAM and not EFB
|
||||
VI_GX_cleanUp();
|
||||
VI_GX_renderCpuFramebuffer();
|
||||
VI_GX_showStats();
|
||||
VI_GX_showFPS();
|
||||
VI_GX_showDEBUG();
|
||||
GX_SetCopyClear ((GXColor){0,0,0,255}, 0xFFFFFF);
|
||||
|
@ -155,7 +154,6 @@ void VI_UpdateScreen()
|
|||
|
||||
//Draw DEBUG to screen
|
||||
VI_GX_cleanUp();
|
||||
VI_GX_showStats();
|
||||
VI_GX_showFPS();
|
||||
VI_GX_showDEBUG();
|
||||
GX_SetCopyClear ((GXColor){0,0,0,255}, 0xFFFFFF);
|
||||
|
@ -183,12 +181,10 @@ void VI_UpdateScreen()
|
|||
if(VI.updateOSD && (gSP.changed & CHANGED_COLORBUFFER))
|
||||
{
|
||||
VI_GX_cleanUp();
|
||||
// VI_GX_showStats();
|
||||
VI_GX_showFPS();
|
||||
VI_GX_showDEBUG();
|
||||
GX_SetCopyClear ((GXColor){0,0,0,255}, 0xFFFFFF);
|
||||
GX_CopyDisp (VI.xfb[VI.which_fb]+GX_xfb_offset, GX_FALSE);
|
||||
// GX_CopyDisp (VI.xfb[VI.which_fb]+GX_xfb_offset, GX_TRUE);
|
||||
GX_DrawDone(); //Wait until EFB->XFB copy is complete
|
||||
VI.updateOSD = false;
|
||||
VI.enableLoadIcon = true;
|
||||
|
@ -260,6 +256,9 @@ void VI_GX_showFPS(){
|
|||
|
||||
void VI_GX_showLoadProg(float percent)
|
||||
{
|
||||
if (!VI.enableLoadIcon)
|
||||
return;
|
||||
|
||||
#ifndef MENU_V2
|
||||
GXColor GXcol1 = {0,128,255,255};
|
||||
GXColor GXcol2 = {0,64,128,255};
|
||||
|
@ -378,9 +377,30 @@ void VI_GX_showLoadProg(float percent)
|
|||
|
||||
#endif //MENU_V2
|
||||
|
||||
if (VI.copy_fb) GX_CopyDisp (VI.xfb[VI.which_fb]+GX_xfb_offset, GX_FALSE);
|
||||
else GX_CopyDisp (VI.xfb[VI.which_fb^1]+GX_xfb_offset, GX_FALSE);
|
||||
GX_Flush();
|
||||
if (OGL.frameBufferTextures)
|
||||
{
|
||||
//Draw DEBUG to screen
|
||||
VI_GX_cleanUp();
|
||||
VI_GX_showFPS();
|
||||
VI_GX_showDEBUG();
|
||||
GX_SetCopyClear ((GXColor){0,0,0,255}, 0xFFFFFF);
|
||||
//Copy EFB->XFB
|
||||
if (VI.copy_fb) GX_CopyDisp (VI.xfb[VI.which_fb]+GX_xfb_offset, GX_FALSE);
|
||||
else GX_CopyDisp (VI.xfb[VI.which_fb^1]+GX_xfb_offset, GX_FALSE);
|
||||
GX_DrawDone(); //Wait until EFB->XFB copy is complete
|
||||
VI.updateOSD = false;
|
||||
VI.enableLoadIcon = true;
|
||||
VI.copy_fb = true;
|
||||
|
||||
//Restore current EFB
|
||||
FrameBuffer_RestoreBuffer( gDP.colorImage.address, gDP.colorImage.size, gDP.colorImage.width );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (VI.copy_fb) GX_CopyDisp (VI.xfb[VI.which_fb]+GX_xfb_offset, GX_FALSE);
|
||||
else GX_CopyDisp (VI.xfb[VI.which_fb^1]+GX_xfb_offset, GX_FALSE);
|
||||
GX_Flush();
|
||||
}
|
||||
// GX_DrawDone();
|
||||
// VI.copy_fb = true;
|
||||
}
|
||||
|
@ -396,6 +416,7 @@ void VI_GX_showDEBUG()
|
|||
{
|
||||
int i = 0;
|
||||
GXColor fontColor = {150, 255, 150, 255};
|
||||
// VI_GX_showStats();
|
||||
DEBUG_update();
|
||||
#ifndef MENU_V2
|
||||
write_font_init_GX(fontColor);
|
||||
|
|
|
@ -324,15 +324,15 @@ EXPORT void CALL ProcessDList(void)
|
|||
sprintf(txtbuffer,"\nPROCESS D LIST!!\n\n");
|
||||
DEBUG_print(txtbuffer,DBG_SDGECKOPRINT);
|
||||
#endif // GLN64_SDLOG
|
||||
if (VI.enableLoadIcon)
|
||||
if (VI.enableLoadIcon && !OGL.frameBufferTextures)
|
||||
{
|
||||
float color[4] = {0.0f,0.0f,0.0f,0.0f};
|
||||
OGL_ClearColorBuffer( color );
|
||||
OGL_ClearDepthBuffer();
|
||||
OGL_GXclearEFB();
|
||||
// VI_GX_clearEFB();
|
||||
VI.enableLoadIcon = false;
|
||||
}
|
||||
VI.enableLoadIcon = false;
|
||||
#endif // __GX__
|
||||
RSP_ProcessDList();
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue