From 2ccba1cf14aaab5cd2bb3585429450300e70e941 Mon Sep 17 00:00:00 2001 From: Bruno Jesus <00cpxxx@gmail.com> Date: Sun, 1 Nov 2015 01:22:46 +0800 Subject: [PATCH] msvfw32: Derive frame dimension from bitmap info when not available. Signed-off-by: Bruno Jesus <00cpxxx@gmail.com> Signed-off-by: Alexandre Julliard --- dlls/msvfw32/drawdib.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/msvfw32/drawdib.c b/dlls/msvfw32/drawdib.c index a6af90f8e4a..e96b0f26bae 100644 --- a/dlls/msvfw32/drawdib.c +++ b/dlls/msvfw32/drawdib.c @@ -347,7 +347,14 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, #undef CHANGED - if ((dxDst == -1) && (dyDst == -1)) + /* If source dimensions are not specified derive them from bitmap header */ + if (dxSrc == -1 && dySrc == -1) + { + dxSrc = lpbi->biWidth; + dySrc = lpbi->biHeight; + } + /* If destination dimensions are not specified derive them from source */ + if (dxDst == -1 && dyDst == -1) { dxDst = dxSrc; dyDst = dySrc;