AVIDump: Add a struct for the state.

So AddFrame use no global state and can be threaded well.
This commit is contained in:
degasus
2016-11-04 18:19:35 +01:00
parent dad5041737
commit be29090aae
9 changed files with 44 additions and 18 deletions

View File

@ -125,7 +125,8 @@ void SWRenderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
// Save screenshot
if (IsFrameDumping())
{
DumpFrameData(GetCurrentColorTexture(), fbWidth, fbHeight, fbWidth * 4, ticks);
AVIDump::Frame state = AVIDump::FetchState(ticks);
DumpFrameData(GetCurrentColorTexture(), fbWidth, fbHeight, fbWidth * 4, state);
FinishFrameData();
}