Added sanity check to the OpenGL framedumper. At startup, the AVI Dumper was being sent frames with a zero pixel height to render, crashing the dumper. Closed issue 1324.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4905 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
40ac160f37
commit
50019fb525
|
@ -926,7 +926,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
|||
u8 *data = (u8 *) malloc(3 * w * h);
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
glReadPixels(0, Renderer::GetTargetHeight() - h + yOffset, w, h, GL_BGR, GL_UNSIGNED_BYTE, data);
|
||||
if (glGetError() == GL_NO_ERROR)
|
||||
if (glGetError() == GL_NO_ERROR && w > 0 && h > 0)
|
||||
{
|
||||
if (!s_bLastFrameDumped)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue