Fix frame dumps on file close in certain situations
This commit is contained in:
parent
ea33405feb
commit
43c48a6f48
|
@ -923,8 +923,8 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||||
{
|
{
|
||||||
if (bLastFrameDumped && bAVIDumping)
|
if (bLastFrameDumped && bAVIDumping)
|
||||||
{
|
{
|
||||||
std::vector<u8>().swap(frame_data);
|
|
||||||
AVIDump::Stop();
|
AVIDump::Stop();
|
||||||
|
std::vector<u8>().swap(frame_data);
|
||||||
bAVIDumping = false;
|
bAVIDumping = false;
|
||||||
OSD::AddMessage("Stop dumping frames to AVI", 2000);
|
OSD::AddMessage("Stop dumping frames to AVI", 2000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -508,9 +508,10 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool color_enable, bool alpha
|
||||||
D3D12_DEPTH_STENCIL_DESC* depth_stencil_desc = nullptr;
|
D3D12_DEPTH_STENCIL_DESC* depth_stencil_desc = nullptr;
|
||||||
|
|
||||||
// EXISTINGD3D11TODO: Should we enable Z testing here?
|
// EXISTINGD3D11TODO: Should we enable Z testing here?
|
||||||
/*if (!bpmem.zmode.testenable) depth_stencil_desc = &s_clear_depth_descs[CLEAR_DEPTH_DESC_DEPTH_DISABLED];
|
/*if (!bpmem.zmode.testenable) depth_stencil_desc =
|
||||||
else */ if (
|
&s_clear_depth_descs[CLEAR_DEPTH_DESC_DEPTH_DISABLED];
|
||||||
z_enable)
|
else */
|
||||||
|
if (z_enable)
|
||||||
depth_stencil_desc = &s_clear_depth_descs[CLEAR_DEPTH_DESC_DEPTH_ENABLED_WRITES_ENABLED];
|
depth_stencil_desc = &s_clear_depth_descs[CLEAR_DEPTH_DESC_DEPTH_ENABLED_WRITES_ENABLED];
|
||||||
else /*if (!z_enable)*/
|
else /*if (!z_enable)*/
|
||||||
depth_stencil_desc = &s_clear_depth_descs[CLEAR_DEPTH_DESC_DEPTH_ENABLED_WRITES_DISABLED];
|
depth_stencil_desc = &s_clear_depth_descs[CLEAR_DEPTH_DESC_DEPTH_ENABLED_WRITES_DISABLED];
|
||||||
|
@ -903,9 +904,8 @@ void Renderer::SwapImpl(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height
|
||||||
{
|
{
|
||||||
if (bLastFrameDumped && bAVIDumping)
|
if (bLastFrameDumped && bAVIDumping)
|
||||||
{
|
{
|
||||||
std::vector<u8>().swap(frame_data);
|
|
||||||
|
|
||||||
AVIDump::Stop();
|
AVIDump::Stop();
|
||||||
|
std::vector<u8>().swap(frame_data);
|
||||||
bAVIDumping = false;
|
bAVIDumping = false;
|
||||||
OSD::AddMessage("Stop dumping frames to AVI", 2000);
|
OSD::AddMessage("Stop dumping frames to AVI", 2000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1530,9 +1530,9 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||||
{
|
{
|
||||||
if (bLastFrameDumped && bAVIDumping)
|
if (bLastFrameDumped && bAVIDumping)
|
||||||
{
|
{
|
||||||
|
AVIDump::Stop();
|
||||||
std::vector<u8>().swap(frame_data);
|
std::vector<u8>().swap(frame_data);
|
||||||
w = h = 0;
|
w = h = 0;
|
||||||
AVIDump::Stop();
|
|
||||||
bAVIDumping = false;
|
bAVIDumping = false;
|
||||||
OSD::AddMessage("Stop dumping frames", 2000);
|
OSD::AddMessage("Stop dumping frames", 2000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@ void AVIDump::AddFrame(const u8* data, int width, int height)
|
||||||
{
|
{
|
||||||
// Store current frame data in case frame dumping stops before next frame update,
|
// Store current frame data in case frame dumping stops before next frame update,
|
||||||
// but make sure that you don't store the last stored frame and check the resolution upon
|
// but make sure that you don't store the last stored frame and check the resolution upon
|
||||||
// closing the file or else you store recusion, and dolphins don't like recursion.
|
// closing the file or else you store recursion, and dolphins don't like recursion.
|
||||||
if (!s_stop_dumping)
|
if (!s_stop_dumping)
|
||||||
{
|
{
|
||||||
StoreFrameData(data, width, height);
|
StoreFrameData(data, width, height);
|
||||||
|
|
Loading…
Reference in New Issue