VideoCommon: Drop RepeatFrameDumpFrame helper.
This was needed with fixed framerate dumping. As we now synchronize the frames, the last one will just get padded.
This commit is contained in:
parent
a9d8e3fe9b
commit
ebc617882b
|
@ -768,7 +768,6 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||||
if (Fifo::WillSkipCurrentFrame() || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) ||
|
if (Fifo::WillSkipCurrentFrame() || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) ||
|
||||||
!fbWidth || !fbHeight)
|
!fbWidth || !fbHeight)
|
||||||
{
|
{
|
||||||
RepeatFrameDumpFrame();
|
|
||||||
Core::Callback_VideoCopiedToXFB(false);
|
Core::Callback_VideoCopiedToXFB(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -778,7 +777,6 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||||
FramebufferManager::GetXFBSource(xfbAddr, fbStride, fbHeight, &xfbCount);
|
FramebufferManager::GetXFBSource(xfbAddr, fbStride, fbHeight, &xfbCount);
|
||||||
if ((!xfbSourceList || xfbCount == 0) && g_ActiveConfig.bUseXFB && !g_ActiveConfig.bUseRealXFB)
|
if ((!xfbSourceList || xfbCount == 0) && g_ActiveConfig.bUseXFB && !g_ActiveConfig.bUseRealXFB)
|
||||||
{
|
{
|
||||||
RepeatFrameDumpFrame();
|
|
||||||
Core::Callback_VideoCopiedToXFB(false);
|
Core::Callback_VideoCopiedToXFB(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -711,7 +711,6 @@ void Renderer::SwapImpl(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height
|
||||||
if (Fifo::WillSkipCurrentFrame() || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) ||
|
if (Fifo::WillSkipCurrentFrame() || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) ||
|
||||||
!fb_width || !fb_height)
|
!fb_width || !fb_height)
|
||||||
{
|
{
|
||||||
RepeatFrameDumpFrame();
|
|
||||||
Core::Callback_VideoCopiedToXFB(false);
|
Core::Callback_VideoCopiedToXFB(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -721,7 +720,6 @@ void Renderer::SwapImpl(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height
|
||||||
FramebufferManager::GetXFBSource(xfb_addr, fb_stride, fb_height, &xfb_count);
|
FramebufferManager::GetXFBSource(xfb_addr, fb_stride, fb_height, &xfb_count);
|
||||||
if ((!xfb_source_list || xfb_count == 0) && g_ActiveConfig.bUseXFB && !g_ActiveConfig.bUseRealXFB)
|
if ((!xfb_source_list || xfb_count == 0) && g_ActiveConfig.bUseXFB && !g_ActiveConfig.bUseRealXFB)
|
||||||
{
|
{
|
||||||
RepeatFrameDumpFrame();
|
|
||||||
Core::Callback_VideoCopiedToXFB(false);
|
Core::Callback_VideoCopiedToXFB(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1353,7 +1353,6 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||||
if (Fifo::WillSkipCurrentFrame() || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) ||
|
if (Fifo::WillSkipCurrentFrame() || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) ||
|
||||||
!fbWidth || !fbHeight)
|
!fbWidth || !fbHeight)
|
||||||
{
|
{
|
||||||
RepeatFrameDumpFrame();
|
|
||||||
Core::Callback_VideoCopiedToXFB(false);
|
Core::Callback_VideoCopiedToXFB(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1363,7 +1362,6 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||||
FramebufferManager::GetXFBSource(xfbAddr, fbStride, fbHeight, &xfbCount);
|
FramebufferManager::GetXFBSource(xfbAddr, fbStride, fbHeight, &xfbCount);
|
||||||
if (g_ActiveConfig.VirtualXFBEnabled() && (!xfbSourceList || xfbCount == 0))
|
if (g_ActiveConfig.VirtualXFBEnabled() && (!xfbSourceList || xfbCount == 0))
|
||||||
{
|
{
|
||||||
RepeatFrameDumpFrame();
|
|
||||||
Core::Callback_VideoCopiedToXFB(false);
|
Core::Callback_VideoCopiedToXFB(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -578,7 +578,6 @@ void Renderer::DumpFrameData(const u8* data, int w, int h, AVIDump::DumpFormat f
|
||||||
m_last_framedump_format = format;
|
m_last_framedump_format = format;
|
||||||
|
|
||||||
// TODO: Refactor this. Right now it's needed for the implace flipping of the image.
|
// TODO: Refactor this. Right now it's needed for the implace flipping of the image.
|
||||||
// It's also used to repeat the last frame.
|
|
||||||
m_frame_data.assign(data, data + image_size);
|
m_frame_data.assign(data, data + image_size);
|
||||||
|
|
||||||
if (!m_last_frame_dumped)
|
if (!m_last_frame_dumped)
|
||||||
|
@ -606,16 +605,6 @@ void Renderer::DumpFrameData(const u8* data, int w, int h, AVIDump::DumpFormat f
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::RepeatFrameDumpFrame()
|
|
||||||
{
|
|
||||||
#if defined(HAVE_LIBAV) || defined(_WIN32)
|
|
||||||
if (SConfig::GetInstance().m_DumpFrames && m_AVI_dumping && !m_frame_data.empty())
|
|
||||||
{
|
|
||||||
AVIDump::AddFrame(m_frame_data.data(), m_last_framedump_width, m_last_framedump_height);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::FlipImageData(u8* data, int w, int h, int pixel_width)
|
void Renderer::FlipImageData(u8* data, int w, int h, int pixel_width)
|
||||||
{
|
{
|
||||||
for (int y = 0; y < h / 2; ++y)
|
for (int y = 0; y < h / 2; ++y)
|
||||||
|
|
|
@ -150,7 +150,6 @@ protected:
|
||||||
bool IsFrameDumping();
|
bool IsFrameDumping();
|
||||||
void DumpFrameData(const u8* data, int w, int h, AVIDump::DumpFormat format,
|
void DumpFrameData(const u8* data, int w, int h, AVIDump::DumpFormat format,
|
||||||
bool swap_upside_down = false);
|
bool swap_upside_down = false);
|
||||||
void RepeatFrameDumpFrame();
|
|
||||||
|
|
||||||
static volatile bool s_bScreenshot;
|
static volatile bool s_bScreenshot;
|
||||||
static std::mutex s_criticalScreenshot;
|
static std::mutex s_criticalScreenshot;
|
||||||
|
|
Loading…
Reference in New Issue