summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorRodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com>2010-05-14 21:47:16 +0000
committerRodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com>2010-05-14 21:47:16 +0000
commitaaafff7f9db6909aa7f59bfb65ad1f2de1616020 (patch)
tree768cb6a01ab0302010e7706c04e292a9b3697f2b /Source
parent68cd793480313d78234c7596272af68475658b46 (diff)
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
Diffstat (limited to 'Source')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/Render.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
index 3c84023f48..767fc867c0 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
@@ -774,8 +774,11 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE
static bool XFBWrited = false;
void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc)
{
+ if(!fbWidth || !fbHeight)
+ return;
s_skipSwap = g_bSkipCurrentFrame;
VideoFifo_CheckEFBAccess();
+ VideoFifo_CheckSwapRequestAt(xfbAddr, fbWidth, fbHeight);
g_framebufferManager.CopyToXFB(xfbAddr, fbWidth, fbHeight, sourceRc);
XFBWrited = true;
// XXX: Without the VI, how would we know what kind of field this is? So
@@ -790,11 +793,11 @@ void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRect
// This function has the final picture. We adjust the aspect ratio here.
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);
return;
- }
+ }
if (field == FIELD_LOWER) xfbAddr -= fbWidth * 2;
u32 xfbCount = 0;
const XFBSource** xfbSourceList = g_framebufferManager.GetXFBSource(xfbAddr, fbWidth, fbHeight, xfbCount);
@@ -1129,9 +1132,9 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
// For testing zbuffer targets.
// Renderer::SetZBufferRender();
// SaveTexture("tex.tga", GL_TEXTURE_RECTANGLE_ARB, s_FakeZTarget, GetTargetWidth(), GetTargetHeight());
-
- g_VideoInitialize.pCopiedToXFB(true);
XFBWrited = false;
+ g_VideoInitialize.pCopiedToXFB(true);
+
}
// Create On-Screen-Messages