summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/SWRenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWRenderer.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/SWRenderer.cpp59
1 files changed, 28 insertions, 31 deletions
diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp
index a170bc6afb..fcab41aebc 100644
--- a/Source/Core/VideoBackends/Software/SWRenderer.cpp
+++ b/Source/Core/VideoBackends/Software/SWRenderer.cpp
@@ -112,42 +112,39 @@ void SWRenderer::UpdateColorTexture(EfbInterface::yuv422_packed* xfb, u32 fbWidt
void SWRenderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
const EFBRectangle& rc, float Gamma)
{
- if (!Fifo::WillSkipCurrentFrame())
+ if (g_ActiveConfig.bUseXFB)
{
- if (g_ActiveConfig.bUseXFB)
- {
- EfbInterface::yuv422_packed* xfb = (EfbInterface::yuv422_packed*)Memory::GetPointer(xfbAddr);
- UpdateColorTexture(xfb, fbWidth, fbHeight);
- }
- else
- {
- EfbInterface::BypassXFB(GetCurrentColorTexture(), fbWidth, fbHeight, rc, Gamma);
- }
+ EfbInterface::yuv422_packed* xfb = (EfbInterface::yuv422_packed*)Memory::GetPointer(xfbAddr);
+ UpdateColorTexture(xfb, fbWidth, fbHeight);
+ }
+ else
+ {
+ EfbInterface::BypassXFB(GetCurrentColorTexture(), fbWidth, fbHeight, rc, Gamma);
+ }
- // Save screenshot
- if (s_bScreenshot)
- {
- std::lock_guard<std::mutex> lk(s_criticalScreenshot);
+ // Save screenshot
+ if (s_bScreenshot)
+ {
+ std::lock_guard<std::mutex> lk(s_criticalScreenshot);
- if (TextureToPng(GetCurrentColorTexture(), fbWidth * 4, s_sScreenshotName, fbWidth, fbHeight,
- false))
- OSD::AddMessage("Screenshot saved to " + s_sScreenshotName);
+ if (TextureToPng(GetCurrentColorTexture(), fbWidth * 4, s_sScreenshotName, fbWidth, fbHeight,
+ false))
+ OSD::AddMessage("Screenshot saved to " + s_sScreenshotName);
- // Reset settings
- s_sScreenshotName.clear();
- s_bScreenshot = false;
- s_screenshotCompleted.Set();
- }
+ // Reset settings
+ s_sScreenshotName.clear();
+ s_bScreenshot = false;
+ s_screenshotCompleted.Set();
+ }
- if (SConfig::GetInstance().m_DumpFrames)
- {
- static int frame_index = 0;
- TextureToPng(GetCurrentColorTexture(), fbWidth * 4,
- StringFromFormat("%sframe%i_color.png",
- File::GetUserPath(D_DUMPFRAMES_IDX).c_str(), frame_index),
- fbWidth, fbHeight, true);
- frame_index++;
- }
+ if (SConfig::GetInstance().m_DumpFrames)
+ {
+ static int frame_index = 0;
+ TextureToPng(GetCurrentColorTexture(), fbWidth * 4,
+ StringFromFormat("%sframe%i_color.png",
+ File::GetUserPath(D_DUMPFRAMES_IDX).c_str(), frame_index),
+ fbWidth, fbHeight, true);
+ frame_index++;
}
OSD::DoCallbacks(OSD::CallbackType::OnFrame);