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
a4926c17
Commit
a4926c17
authored
Jun 01, 2005
by
Richard Cohen
Committed by
Alexandre Julliard
Jun 01, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Add static, const.
- Don't change the passed in bitmap header.
parent
e8b21c3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
drawdib.c
dlls/msvideo/drawdib.c
+14
-6
No files found.
dlls/msvideo/drawdib.c
View file @
a4926c17
...
@@ -49,7 +49,7 @@ typedef struct tagWINE_HDD {
...
@@ -49,7 +49,7 @@ typedef struct tagWINE_HDD {
struct
tagWINE_HDD
*
next
;
struct
tagWINE_HDD
*
next
;
}
WINE_HDD
;
}
WINE_HDD
;
int
num_colours
(
LPBITMAPINFOHEADER
lpbi
)
static
int
num_colours
(
const
LPBITMAPINFOHEADER
lpbi
)
{
{
if
(
lpbi
->
biClrUsed
)
if
(
lpbi
->
biClrUsed
)
return
lpbi
->
biClrUsed
;
return
lpbi
->
biClrUsed
;
...
@@ -252,11 +252,15 @@ BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd,
...
@@ -252,11 +252,15 @@ BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd,
whdd
->
hMemDC
=
CreateCompatibleDC
(
hdc
);
whdd
->
hMemDC
=
CreateCompatibleDC
(
hdc
);
TRACE
(
"Creating: %ld, %p
\n
"
,
whdd
->
lpbiOut
->
biSize
,
whdd
->
lpvbits
);
TRACE
(
"Creating: %ld, %p
\n
"
,
whdd
->
lpbiOut
->
biSize
,
whdd
->
lpvbits
);
whdd
->
hDib
=
CreateDIBSection
(
whdd
->
hMemDC
,
(
BITMAPINFO
*
)
whdd
->
lpbiOut
,
DIB_RGB_COLORS
,
&
(
whdd
->
lpvbits
),
0
,
0
);
whdd
->
hDib
=
CreateDIBSection
(
whdd
->
hMemDC
,
(
BITMAPINFO
*
)
whdd
->
lpbiOut
,
DIB_RGB_COLORS
,
&
(
whdd
->
lpvbits
),
0
,
0
);
if
(
!
whdd
->
hDib
)
if
(
whdd
->
hDib
)
{
{
TRACE
(
"Created: %p,%p
\n
"
,
whdd
->
hDib
,
whdd
->
lpvbits
);
}
else
{
ret
=
FALSE
;
TRACE
(
"Error: %ld
\n
"
,
GetLastError
());
TRACE
(
"Error: %ld
\n
"
,
GetLastError
());
}
}
TRACE
(
"Created: %p,%p
\n
"
,
whdd
->
hDib
,
whdd
->
lpvbits
);
whdd
->
hOldDib
=
SelectObject
(
whdd
->
hMemDC
,
whdd
->
hDib
);
whdd
->
hOldDib
=
SelectObject
(
whdd
->
hMemDC
,
whdd
->
hDib
);
}
}
...
@@ -302,6 +306,8 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
...
@@ -302,6 +306,8 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
whdd
=
MSVIDEO_GetHddPtr
(
hdd
);
whdd
=
MSVIDEO_GetHddPtr
(
hdd
);
if
(
!
whdd
)
return
FALSE
;
if
(
!
whdd
)
return
FALSE
;
TRACE
(
"whdd=%p
\n
"
,
whdd
);
if
(
wFlags
&
~
(
DDF_SAME_HDC
|
DDF_SAME_DRAW
|
DDF_NOTKEYFRAME
|
DDF_UPDATE
|
DDF_DONTDRAW
|
DDF_BACKGROUNDPAL
))
if
(
wFlags
&
~
(
DDF_SAME_HDC
|
DDF_SAME_DRAW
|
DDF_NOTKEYFRAME
|
DDF_UPDATE
|
DDF_DONTDRAW
|
DDF_BACKGROUNDPAL
))
FIXME
(
"wFlags == 0x%08lx not handled
\n
"
,
(
DWORD
)
wFlags
);
FIXME
(
"wFlags == 0x%08lx not handled
\n
"
,
(
DWORD
)
wFlags
);
...
@@ -332,9 +338,11 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
...
@@ -332,9 +338,11 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
if
(
!
(
wFlags
&
DDF_UPDATE
))
if
(
!
(
wFlags
&
DDF_UPDATE
))
{
{
DWORD
biSizeImage
=
lpbi
->
biSizeImage
;
/* biSizeImage may be set to 0 for BI_RGB (uncompressed) bitmaps */
/* biSizeImage may be set to 0 for BI_RGB (uncompressed) bitmaps */
if
((
lpbi
->
biCompression
==
BI_RGB
)
&&
(
lpbi
->
biSizeImage
==
0
))
if
((
lpbi
->
biCompression
==
BI_RGB
)
&&
(
biSizeImage
==
0
))
lpbi
->
biSizeImage
=
((
lpbi
->
biWidth
*
lpbi
->
biBitCount
+
31
)
/
32
)
*
4
*
lpbi
->
biHeight
;
biSizeImage
=
((
lpbi
->
biWidth
*
lpbi
->
biBitCount
+
31
)
/
32
)
*
4
*
lpbi
->
biHeight
;
if
(
lpbi
->
biCompression
)
if
(
lpbi
->
biCompression
)
{
{
...
@@ -349,7 +357,7 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
...
@@ -349,7 +357,7 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
}
}
else
else
{
{
memcpy
(
whdd
->
lpvbits
,
lpBits
,
lpbi
->
biSizeImage
);
memcpy
(
whdd
->
lpvbits
,
lpBits
,
biSizeImage
);
}
}
}
}
if
(
!
(
wFlags
&
DDF_DONTDRAW
)
&&
whdd
->
hpal
)
if
(
!
(
wFlags
&
DDF_DONTDRAW
)
&&
whdd
->
hpal
)
...
...
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