gsdx-debug: add 2 extra frames in GS dump

Initially I was afraid of the size increase but it can be
higly compressed.

Sometimes image was computed inside a RT but never outputed to
the screen which remains black. It is annoying to see the glitches
This commit is contained in:
Gregory Hainaut 2015-05-11 13:45:24 +02:00
parent b3d8981a22
commit f0de7d6386
2 changed files with 5 additions and 1 deletions

View File

@ -38,6 +38,7 @@ void GSDump::Open(const string& fn, uint32 crc, const GSFreezeData& fd, const GS
m_gs = fopen((fn + ".gs").c_str(), "wb"); m_gs = fopen((fn + ".gs").c_str(), "wb");
m_frames = 0; m_frames = 0;
m_extra_frames = 2;
if(m_gs) if(m_gs)
{ {
@ -83,9 +84,11 @@ void GSDump::VSync(int field, bool last, const GSPrivRegSet* regs)
fputc(1, m_gs); fputc(1, m_gs);
fputc(field, m_gs); fputc(field, m_gs);
if((++m_frames & 1) == 0 && last) if((++m_frames & 1) == 0 && last && (m_extra_frames <= 0))
{ {
Close(); Close();
} else if (last) {
m_extra_frames--;
} }
} }
} }

View File

@ -47,6 +47,7 @@ class GSDump
{ {
FILE* m_gs; FILE* m_gs;
int m_frames; int m_frames;
int m_extra_frames;
public: public:
GSDump(); GSDump();