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
8da83349
Commit
8da83349
authored
Jun 29, 2008
by
Michael Karcher
Committed by
Alexandre Julliard
Jul 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Fix GetDIBits of 1 bit DDBs.
1 bpp DDBs seem to always carry an implicit palette of black and white, regardless of what the DC says. Based on a patch from Eric Pouech.
parent
fd8746b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
bitmap.c
dlls/gdi32/tests/bitmap.c
+1
-4
dib.c
dlls/winex11.drv/dib.c
+13
-2
No files found.
dlls/gdi32/tests/bitmap.c
View file @
8da83349
...
...
@@ -1190,10 +1190,7 @@ static void test_GetDIBits_selected_DIB(UINT bpp)
break
;
}
}
if
(
bpp
!=
1
)
ok
(
equalContents
,
"GetDIBits with %d bpp DIB selected in DC: Invalid DIB bits
\n
"
,
bpp
);
else
todo_wine
ok
(
equalContents
,
"GetDIBits with %d bpp DIB selected in DC: Invalid DIB bits
\n
"
,
bpp
);
ok
(
equalContents
,
"GetDIBits with %d bpp DIB selected in DC: Invalid DIB bits
\n
"
,
bpp
);
HeapFree
(
GetProcessHeap
(),
0
,
bits2
);
DeleteDC
(
dc
);
...
...
dlls/winex11.drv/dib.c
View file @
8da83349
...
...
@@ -4031,13 +4031,24 @@ INT X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
int
bitmap_type
;
BOOL
core_header
;
void
*
colorPtr
;
GetPaletteEntries
(
GetCurrentObject
(
physDev
->
hdc
,
OBJ_PAL
),
0
,
256
,
palette
)
;
const
PALETTEENTRY
peBlack
=
{
0
,
0
,
0
,
0
};
const
PALETTEENTRY
peWhite
=
{
255
,
255
,
255
,
0
}
;
if
(
!
physBitmap
)
return
0
;
if
(
!
(
obj_size
=
GetObjectW
(
hbitmap
,
sizeof
(
dib
),
&
dib
)))
return
0
;
bitmap_type
=
DIB_GetBitmapInfo
(
(
BITMAPINFOHEADER
*
)
info
,
&
width
,
&
tempHeight
,
&
descr
.
infoBpp
,
&
descr
.
compression
);
if
(
physDev
->
depth
>
1
)
{
GetPaletteEntries
(
GetCurrentObject
(
physDev
->
hdc
,
OBJ_PAL
),
0
,
256
,
palette
);
}
else
{
palette
[
0
]
=
peBlack
;
palette
[
1
]
=
peWhite
;
}
if
(
bitmap_type
==
-
1
)
{
ERR
(
"Invalid bitmap
\n
"
);
...
...
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