summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/SWRenderer.cpp
diff options
context:
space:
mode:
authorDolphin Bot <dolphin-emu-bot@users.noreply.github.com>2014-07-17 02:04:03 +0200
committerDolphin Bot <dolphin-emu-bot@users.noreply.github.com>2014-07-17 02:04:03 +0200
commit51dff5a74ecc0bafe965f360c898b381e8911c3a (patch)
treeb989c9af34aa6bb8d00535985c612431be06c4cd /Source/Core/VideoBackends/Software/SWRenderer.cpp
parent8cf21cdcdb30d1587a03b6fbb131465f489d3d25 (diff)
parent92eed472132a5d4589779bee5fc1d63db6023059 (diff)
Merge pull request #622 from phire/sw-fix-frame-dump
Fixed Frame dumping in VideoSoftware.
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWRenderer.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/SWRenderer.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp
index 875f9bd7ee..fba685370c 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();