Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c68589e3
Commit
c68589e3
authored
Jul 30, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Replicate a Windows bug in StretchDIBits for top-down bitmaps in the non-stretching case.
Found by Mathias Kosch.
parent
d9cc69be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
dib.c
dlls/gdi32/dib.c
+8
-0
bitmap.c
dlls/gdi32/tests/bitmap.c
+1
-1
No files found.
dlls/gdi32/dib.c
View file @
c68589e3
...
...
@@ -227,6 +227,14 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
return
0
;
}
if
(
xSrc
==
0
&&
ySrc
==
0
&&
widthDst
==
widthSrc
&&
heightDst
==
heightSrc
&&
info
->
bmiHeader
.
biCompression
==
BI_RGB
)
{
/* Windows appears to have a fast case optimization
* that uses the wrong origin for top-down DIBs */
if
(
height
<
0
&&
heightSrc
<
abs
(
height
))
ySrc
=
abs
(
height
)
-
heightSrc
;
}
hBitmap
=
GetCurrentObject
(
hdc
,
OBJ_BITMAP
);
if
(
xDst
==
0
&&
yDst
==
0
&&
xSrc
==
0
&&
ySrc
==
0
&&
...
...
dlls/gdi32/tests/bitmap.c
View file @
c68589e3
...
...
@@ -2813,7 +2813,7 @@ static void test_StretchDIBits(void)
expected
[
2
]
=
0x00000000
,
expected
[
3
]
=
0x00000000
;
legacy_expected
[
0
]
=
0xFEDCBA98
,
legacy_expected
[
1
]
=
0x00000000
;
legacy_expected
[
2
]
=
0x00000000
,
legacy_expected
[
3
]
=
0x00000000
;
todo_wine
check_StretchDIBits_stretch
(
hdcDst
,
dstBuffer
,
srcBuffer
,
check_StretchDIBits_stretch
(
hdcDst
,
dstBuffer
,
srcBuffer
,
0
,
0
,
1
,
1
,
0
,
0
,
1
,
1
,
expected
,
legacy_expected
,
__LINE__
);
expected
[
0
]
=
0xFEDCBA98
,
expected
[
1
]
=
0xFEDCBA98
;
...
...
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