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
0457b0c3
Commit
0457b0c3
authored
Feb 16, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: CreateBitmapIndirect should ignore the provided bm.bmWidthBytes.
parent
f9975b00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
bitmap.c
dlls/gdi32/bitmap.c
+3
-0
bitmap.c
dlls/gdi32/tests/bitmap.c
+14
-0
No files found.
dlls/gdi32/bitmap.c
View file @
0457b0c3
...
...
@@ -263,6 +263,9 @@ HBITMAP WINAPI CreateBitmapIndirect( const BITMAP *bmp )
return
NULL
;
}
/* Windows ignores the provided bm.bmWidthBytes */
bm
.
bmWidthBytes
=
BITMAP_GetWidthBytes
(
bm
.
bmWidth
,
bm
.
bmBitsPixel
);
/* Create the BITMAPOBJ */
bmpobj
=
GDI_AllocObject
(
sizeof
(
BITMAPOBJ
),
BITMAP_MAGIC
,
(
HGDIOBJ
*
)
&
hbitmap
,
&
bitmap_funcs
);
...
...
dlls/gdi32/tests/bitmap.c
View file @
0457b0c3
...
...
@@ -1637,6 +1637,7 @@ static void test_mono_1x1_bmp_dbg(HBITMAP hbmp, int line)
static
void
test_CreateBitmap
(
void
)
{
BITMAP
bmp
;
HDC
screenDC
=
GetDC
(
0
);
HDC
hdc
=
CreateCompatibleDC
(
screenDC
);
...
...
@@ -1684,6 +1685,19 @@ static void test_CreateBitmap(void)
DeleteDC
(
hdc
);
ReleaseDC
(
0
,
screenDC
);
/* show that Windows ignores the provided bm.bmWidthBytes */
bmp
.
bmType
=
0
;
bmp
.
bmWidth
=
1
;
bmp
.
bmHeight
=
1
;
bmp
.
bmWidthBytes
=
28
;
bmp
.
bmPlanes
=
1
;
bmp
.
bmBitsPixel
=
1
;
bmp
.
bmBits
=
NULL
;
bm
=
CreateBitmapIndirect
(
&
bmp
);
ok
(
bm
!=
0
,
"CreateBitmapIndirect error %u
\n
"
,
GetLastError
());
test_mono_1x1_bmp
(
bm
);
DeleteObject
(
bm
);
}
START_TEST
(
bitmap
)
...
...
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