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
23259ce5
Commit
23259ce5
authored
Jul 11, 2000
by
Stephane Lussier
Committed by
Alexandre Julliard
Jul 11, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In CreateDIBSection function, if hdc is NULL it now uses the desktop DC
instead of failing.
parent
a319a978
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
dib.c
objects/dib.c
+28
-2
No files found.
objects/dib.c
View file @
23259ce5
...
...
@@ -866,7 +866,17 @@ HBITMAP16 WINAPI CreateDIBSection16 (HDC16 hdc, BITMAPINFO *bmi, UINT16 usage,
DWORD
offset
)
{
HBITMAP16
hbitmap
;
DC
*
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
DC_MAGIC
);
DC
*
dc
;
BOOL
bDesktopDC
=
FALSE
;
/* If the reference hdc is null, take the desktop dc */
if
(
hdc
==
0
)
{
hdc
=
CreateCompatibleDC
(
0
);
bDesktopDC
=
TRUE
;
}
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
DC_MAGIC
);
if
(
!
dc
)
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
METAFILE_DC_MAGIC
);
if
(
!
dc
)
return
(
HBITMAP16
)
NULL
;
...
...
@@ -874,6 +884,9 @@ HBITMAP16 WINAPI CreateDIBSection16 (HDC16 hdc, BITMAPINFO *bmi, UINT16 usage,
GDI_HEAP_UNLOCK
(
hdc
);
if
(
bDesktopDC
)
DeleteDC
(
hdc
);
return
hbitmap
;
}
...
...
@@ -885,7 +898,17 @@ HBITMAP DIB_CreateDIBSection(HDC hdc, BITMAPINFO *bmi, UINT usage,
DWORD
offset
,
DWORD
ovr_pitch
)
{
HBITMAP
hbitmap
;
DC
*
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
DC_MAGIC
);
DC
*
dc
;
BOOL
bDesktopDC
=
FALSE
;
/* If the reference hdc is null, take the desktop dc */
if
(
hdc
==
0
)
{
hdc
=
CreateCompatibleDC
(
0
);
bDesktopDC
=
TRUE
;
}
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
DC_MAGIC
);
if
(
!
dc
)
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
METAFILE_DC_MAGIC
);
if
(
!
dc
)
return
(
HBITMAP
)
NULL
;
...
...
@@ -893,6 +916,9 @@ HBITMAP DIB_CreateDIBSection(HDC hdc, BITMAPINFO *bmi, UINT usage,
GDI_HEAP_UNLOCK
(
hdc
);
if
(
bDesktopDC
)
DeleteDC
(
hdc
);
return
hbitmap
;
}
...
...
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