mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
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:
@ -926,7 +926,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
|||||||
u8 *data = (u8 *) malloc(3 * w * h);
|
u8 *data = (u8 *) malloc(3 * w * h);
|
||||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||||
glReadPixels(0, Renderer::GetTargetHeight() - h + yOffset, w, h, GL_BGR, GL_UNSIGNED_BYTE, data);
|
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)
|
if (!s_bLastFrameDumped)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user