a little fix for real xfb in opengl that stop working after one of my commits.
thanks to lordmark to point me the exact revision. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5451 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
68cd793480
commit
aaafff7f9d
|
@ -774,8 +774,11 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE
|
||||||
static bool XFBWrited = false;
|
static bool XFBWrited = false;
|
||||||
void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc)
|
void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc)
|
||||||
{
|
{
|
||||||
|
if(!fbWidth || !fbHeight)
|
||||||
|
return;
|
||||||
s_skipSwap = g_bSkipCurrentFrame;
|
s_skipSwap = g_bSkipCurrentFrame;
|
||||||
VideoFifo_CheckEFBAccess();
|
VideoFifo_CheckEFBAccess();
|
||||||
|
VideoFifo_CheckSwapRequestAt(xfbAddr, fbWidth, fbHeight);
|
||||||
g_framebufferManager.CopyToXFB(xfbAddr, fbWidth, fbHeight, sourceRc);
|
g_framebufferManager.CopyToXFB(xfbAddr, fbWidth, fbHeight, sourceRc);
|
||||||
XFBWrited = true;
|
XFBWrited = true;
|
||||||
// XXX: Without the VI, how would we know what kind of field this is? So
|
// XXX: Without the VI, how would we know what kind of field this is? So
|
||||||
|
@ -790,7 +793,7 @@ void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRect
|
||||||
// This function has the final picture. We adjust the aspect ratio here.
|
// This function has the final picture. We adjust the aspect ratio here.
|
||||||
void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||||
{
|
{
|
||||||
if (g_bSkipCurrentFrame || !XFBWrited || !fbWidth || !fbHeight)
|
if (g_bSkipCurrentFrame || (!XFBWrited && !g_ActiveConfig.bUseRealXFB) || !fbWidth || !fbHeight)
|
||||||
{
|
{
|
||||||
g_VideoInitialize.pCopiedToXFB(false);
|
g_VideoInitialize.pCopiedToXFB(false);
|
||||||
return;
|
return;
|
||||||
|
@ -1129,9 +1132,9 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||||
// For testing zbuffer targets.
|
// For testing zbuffer targets.
|
||||||
// Renderer::SetZBufferRender();
|
// Renderer::SetZBufferRender();
|
||||||
// SaveTexture("tex.tga", GL_TEXTURE_RECTANGLE_ARB, s_FakeZTarget, GetTargetWidth(), GetTargetHeight());
|
// SaveTexture("tex.tga", GL_TEXTURE_RECTANGLE_ARB, s_FakeZTarget, GetTargetWidth(), GetTargetHeight());
|
||||||
|
|
||||||
g_VideoInitialize.pCopiedToXFB(true);
|
|
||||||
XFBWrited = false;
|
XFBWrited = false;
|
||||||
|
g_VideoInitialize.pCopiedToXFB(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create On-Screen-Messages
|
// Create On-Screen-Messages
|
||||||
|
|
Loading…
Reference in New Issue