Merge pull request #622 from phire/sw-fix-frame-dump

Fixed Frame dumping in VideoSoftware.
This commit is contained in:
Dolphin Bot
2014-07-17 02:04:03 +02:00
6 changed files with 26 additions and 33 deletions

View File

@ -152,10 +152,14 @@ void SWRenderer::DrawDebugText()
SWRenderer::RenderText(debugtext.c_str(), 20, 20, 0xFFFFFF00);
}
u8* SWRenderer::getColorTexture() {
u8* SWRenderer::getNextColorTexture() {
return s_xfbColorTexture[!s_currentColorTexture];
}
u8* SWRenderer::getCurrentColorTexture() {
return s_xfbColorTexture[s_currentColorTexture];
}
void SWRenderer::swapColorTexture() {
s_currentColorTexture = !s_currentColorTexture;
}
@ -168,7 +172,7 @@ void SWRenderer::UpdateColorTexture(EfbInterface::yuv422_packed *xfb, u32 fbWidt
}
u32 offset = 0;
u8 *TexturePointer = getColorTexture();
u8 *TexturePointer = getNextColorTexture();
for (u16 y = 0; y < fbHeight; y++)
{
@ -202,7 +206,7 @@ void SWRenderer::Swap(u32 fbWidth, u32 fbHeight)
{
GLInterface->Update(); // just updates the render window position and the backbuffer size
if (!g_SWVideoConfig.bHwRasterizer)
SWRenderer::DrawTexture(s_xfbColorTexture[s_currentColorTexture], fbWidth, fbHeight);
SWRenderer::DrawTexture(getCurrentColorTexture(), fbWidth, fbHeight);
swstats.frameCount++;
SWRenderer::SwapBuffer();