Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
47a3a052
Commit
47a3a052
authored
May 02, 2014
by
Akihiro Sagawa
Committed by
Alexandre Julliard
May 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvfw32: Drawdib doesn't support inverted DIBs.
parent
93089217
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
drawdib.c
dlls/msvfw32/drawdib.c
+14
-3
drawdib.c
dlls/msvfw32/tests/drawdib.c
+7
-0
No files found.
dlls/msvfw32/drawdib.c
View file @
47a3a052
...
...
@@ -246,9 +246,18 @@ BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd,
DWORD
dwSize
;
/* No compression */
TRACE
(
"Not compressed!
\n
"
);
dwSize
=
lpbi
->
biSize
+
num_colours
(
lpbi
)
*
sizeof
(
RGBQUAD
);
whdd
->
lpbiOut
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
);
memcpy
(
whdd
->
lpbiOut
,
lpbi
,
dwSize
);
if
(
lpbi
->
biHeight
<=
0
)
{
/* we don't draw inverted DIBs */
TRACE
(
"detected inverted DIB
\n
"
);
ret
=
FALSE
;
}
else
{
dwSize
=
lpbi
->
biSize
+
num_colours
(
lpbi
)
*
sizeof
(
RGBQUAD
);
whdd
->
lpbiOut
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
);
memcpy
(
whdd
->
lpbiOut
,
lpbi
,
dwSize
);
}
}
if
(
ret
)
...
...
@@ -332,6 +341,8 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
{
TRACE
(
"Something changed!
\n
"
);
ret
=
DrawDibBegin
(
hdd
,
hdc
,
dxDst
,
dyDst
,
lpbi
,
dxSrc
,
dySrc
,
0
);
if
(
!
ret
)
return
ret
;
}
#undef CHANGED
...
...
dlls/msvfw32/tests/drawdib.c
View file @
47a3a052
...
...
@@ -98,6 +98,13 @@ static void test_DrawDib_sizeimage(void)
{
WIDTH
,
HEIGHT
,
WIDTH
*
HEIGHT
*
sizeof
(
RGBQUAD
),
"bc943d5ab024b8b0118d0a80aa283055d39942b8"
},
/* [1] zero size */
{
WIDTH
,
HEIGHT
,
0
,
"bc943d5ab024b8b0118d0a80aa283055d39942b8"
},
/* error patterns */
{
WIDTH
,
-
HEIGHT
,
0
,
""
},
{
-
WIDTH
,
HEIGHT
,
0
,
""
},
{
-
WIDTH
,
-
HEIGHT
,
0
,
""
},
{
0
,
0
,
0
,
""
},
{
0
,
HEIGHT
,
0
,
""
},
{
WIDTH
,
0
,
0
,
""
},
};
HDC
hdc
;
DWORD
src_dib_size
,
dst_dib_size
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment