VideoSW: Use VideoCommon frame dumping.
This commit is contained in:
parent
7d5363ffa8
commit
df5eff9ab7
|
@ -123,28 +123,10 @@ void SWRenderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save screenshot
|
// Save screenshot
|
||||||
if (s_bScreenshot)
|
if (IsFrameDumping())
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(s_criticalScreenshot);
|
DumpFrameData(GetCurrentColorTexture(), fbWidth, fbHeight, fbWidth * 4, ticks);
|
||||||
|
FinishFrameData();
|
||||||
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
OSD::DoCallbacks(OSD::CallbackType::OnFrame);
|
||||||
|
|
Loading…
Reference in New Issue