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
85cacd8f
Commit
85cacd8f
authored
Mar 28, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed call to DIB_GetDIBWidthBytes.
parent
e21c15e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
main.c
dlls/ddraw/ddraw/main.c
+0
-1
dib.c
dlls/ddraw/dsurface/dib.c
+23
-1
No files found.
dlls/ddraw/ddraw/main.c
View file @
85cacd8f
...
...
@@ -34,7 +34,6 @@
#include "ddraw.h"
#include "d3d.h"
#include "wine/debug.h"
#include "bitmap.h"
#include "ddraw_private.h"
#include "ddraw/main.h"
...
...
dlls/ddraw/dsurface/dib.c
View file @
85cacd8f
...
...
@@ -35,6 +35,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
static
ICOM_VTABLE
(
IDirectDrawSurface7
)
DIB_IDirectDrawSurface7_VTable
;
/* Return the width of a DIB bitmap in bytes. DIB bitmap data is 32-bit aligned. */
inline
static
int
get_dib_width_bytes
(
int
width
,
int
depth
)
{
int
words
;
switch
(
depth
)
{
case
1
:
words
=
(
width
+
31
)
/
32
;
break
;
case
4
:
words
=
(
width
+
7
)
/
8
;
break
;
case
8
:
words
=
(
width
+
3
)
/
4
;
break
;
case
15
:
case
16
:
words
=
(
width
+
1
)
/
2
;
break
;
case
24
:
words
=
(
width
*
3
+
3
)
/
4
;
break
;
default:
WARN
(
"(%d): Unsupported depth
\n
"
,
depth
);
/* fall through */
case
32
:
words
=
width
;
break
;
}
return
4
*
words
;
}
static
HRESULT
create_dib
(
IDirectDrawSurfaceImpl
*
This
)
{
BITMAPINFO
*
b_info
;
...
...
@@ -136,7 +158,7 @@ static HRESULT create_dib(IDirectDrawSurfaceImpl* This)
if
(
!
This
->
surface_desc
.
u1
.
lPitch
)
{
/* This can't happen, right? */
/* or use GDI_GetObj to get it from the created DIB? */
This
->
surface_desc
.
u1
.
lPitch
=
DIB_GetDIBWidthB
ytes
(
b_info
->
bmiHeader
.
biWidth
,
b_info
->
bmiHeader
.
biBitCount
);
This
->
surface_desc
.
u1
.
lPitch
=
get_dib_width_b
ytes
(
b_info
->
bmiHeader
.
biWidth
,
b_info
->
bmiHeader
.
biBitCount
);
This
->
surface_desc
.
dwFlags
|=
DDSD_PITCH
;
}
...
...
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