diff options
| author | Scott Mansell <phiren@gmail.com> | 2014-07-14 23:51:55 +1200 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2014-07-17 11:43:59 +1200 |
| commit | 92eed472132a5d4589779bee5fc1d63db6023059 (patch) | |
| tree | 4cea8f0f83a5a3da33066a4b063723f62afdc7e8 /Source/Core/VideoBackends/Software/SWRenderer.cpp | |
| parent | 3ac4e9f171b116d4b09990058c18741598bb2ef8 (diff) | |
Fixed Frame dumping in VideoSoftware.
Old code dumped the efb, which was no-longer relevant since the
backend gained xfb support.
New code dumps the colour texture which is about to be rendered to
the screen so correctly reflects the bypassXFB option.
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWRenderer.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWRenderer.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp index 40e89dd3d1..40e69523e3 100644 --- a/Source/Core/VideoBackends/Software/SWRenderer.cpp +++ b/Source/Core/VideoBackends/Software/SWRenderer.cpp @@ -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(); |
