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
c668354c
Commit
c668354c
authored
Aug 05, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Always set compression to BI_BITFIELDS for 16-bpp DIB sections.
parent
cf4c565f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
dib.c
dlls/gdi32/dib.c
+2
-7
dib.c
dlls/gdi32/tests/dib.c
+0
-1
No files found.
dlls/gdi32/dib.c
View file @
c668354c
...
...
@@ -1221,15 +1221,9 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
dib
->
dsBmih
.
biClrUsed
=
1
<<
info
->
bmiHeader
.
biBitCount
;
/* set dsBitfields values */
dib
->
dsBitfields
[
0
]
=
dib
->
dsBitfields
[
1
]
=
dib
->
dsBitfields
[
2
]
=
0
;
if
(
info
->
bmiHeader
.
biBitCount
==
16
&&
info
->
bmiHeader
.
biCompression
==
BI_RGB
)
{
/* In this case Windows changes biCompression to BI_BITFIELDS,
however for now we won't do this, as there are a lot
of places where BI_BITFIELDS is currently unsupported. */
/* dib->dsBmih.biCompression = compression = BI_BITFIELDS;*/
dib
->
dsBmih
.
biCompression
=
BI_BITFIELDS
;
dib
->
dsBitfields
[
0
]
=
0x7c00
;
dib
->
dsBitfields
[
1
]
=
0x03e0
;
dib
->
dsBitfields
[
2
]
=
0x001f
;
...
...
@@ -1241,6 +1235,7 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
dib
->
dsBitfields
[
2
]
=
*
((
const
DWORD
*
)
bmi
->
bmiColors
+
2
);
if
(
!
dib
->
dsBitfields
[
0
]
||
!
dib
->
dsBitfields
[
1
]
||
!
dib
->
dsBitfields
[
2
])
goto
error
;
}
else
dib
->
dsBitfields
[
0
]
=
dib
->
dsBitfields
[
1
]
=
dib
->
dsBitfields
[
2
]
=
0
;
/* get storage location for DIB bits */
...
...
dlls/gdi32/tests/dib.c
View file @
c668354c
...
...
@@ -1125,7 +1125,6 @@ static void test_simple_graphics(void)
ok
(
ds
.
dsBitfields
[
0
]
==
0x7c00
,
"got %08x
\n
"
,
ds
.
dsBitfields
[
0
]);
ok
(
ds
.
dsBitfields
[
1
]
==
0x03e0
,
"got %08x
\n
"
,
ds
.
dsBitfields
[
1
]);
ok
(
ds
.
dsBitfields
[
2
]
==
0x001f
,
"got %08x
\n
"
,
ds
.
dsBitfields
[
2
]);
todo_wine
ok
(
ds
.
dsBmih
.
biCompression
==
BI_BITFIELDS
,
"got %x
\n
"
,
ds
.
dsBmih
.
biCompression
);
orig_bm
=
SelectObject
(
mem_dc
,
dib
);
...
...
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