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
86eb2111
Commit
86eb2111
authored
Jun 07, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Rename PixelFormat_DD2WineD3D() to wined3dformat_from_ddrawformat().
For consistency with the other D3D dlls.
parent
e8905e36
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
20 deletions
+8
-20
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-1
surface.c
dlls/ddraw/surface.c
+5
-5
utils.c
dlls/ddraw/utils.c
+2
-14
No files found.
dlls/ddraw/ddraw_private.h
View file @
86eb2111
...
...
@@ -552,7 +552,7 @@ struct d3d_vertex_buffer *unsafe_impl_from_IDirect3DVertexBuffer7(IDirect3DVerte
(((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1)
void
PixelFormat_WineD3DtoDD
(
DDPIXELFORMAT
*
DDPixelFormat
,
enum
wined3d_format_id
WineD3DFormat
)
DECLSPEC_HIDDEN
;
enum
wined3d_format_id
PixelFormat_DD2WineD3D
(
const
DDPIXELFORMAT
*
DDPixelF
ormat
)
DECLSPEC_HIDDEN
;
enum
wined3d_format_id
wined3dformat_from_ddrawformat
(
const
DDPIXELFORMAT
*
f
ormat
)
DECLSPEC_HIDDEN
;
void
DDRAW_dump_surface_desc
(
const
DDSURFACEDESC2
*
lpddsd
)
DECLSPEC_HIDDEN
;
void
dump_D3DMATRIX
(
const
D3DMATRIX
*
mat
)
DECLSPEC_HIDDEN
;
void
DDRAW_dump_DDCAPS
(
const
DDCAPS
*
lpcaps
)
DECLSPEC_HIDDEN
;
...
...
dlls/ddraw/surface.c
View file @
86eb2111
...
...
@@ -4328,7 +4328,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface,
if
(
DDSD
->
dwFlags
&
DDSD_PIXELFORMAT
)
{
enum
wined3d_format_id
current_format_id
;
format_id
=
PixelFormat_DD2WineD3D
(
&
DDSD
->
u4
.
ddpfPixelFormat
);
format_id
=
wined3dformat_from_ddrawformat
(
&
DDSD
->
u4
.
ddpfPixelFormat
);
if
(
format_id
==
WINED3DFMT_UNKNOWN
)
{
...
...
@@ -4336,7 +4336,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface,
wined3d_mutex_unlock
();
return
DDERR_INVALIDPARAMS
;
}
current_format_id
=
PixelFormat_DD2WineD3D
(
&
This
->
surface_desc
.
u4
.
ddpfPixelFormat
);
current_format_id
=
wined3dformat_from_ddrawformat
(
&
This
->
surface_desc
.
u4
.
ddpfPixelFormat
);
if
(
format_id
!=
current_format_id
)
{
TRACE
(
"Surface format changed from %#x to %#x.
\n
"
,
current_format_id
,
format_id
);
...
...
@@ -4345,7 +4345,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface,
}
else
{
format_id
=
PixelFormat_DD2WineD3D
(
&
This
->
surface_desc
.
u4
.
ddpfPixelFormat
);
format_id
=
wined3dformat_from_ddrawformat
(
&
This
->
surface_desc
.
u4
.
ddpfPixelFormat
);
}
if
(
update_wined3d
)
...
...
@@ -5613,7 +5613,7 @@ HRESULT ddraw_surface_create_texture(struct ddraw_surface *surface, DWORD surfac
else
pool
=
WINED3D_POOL_DEFAULT
;
wined3d_desc
.
format
=
PixelFormat_DD2WineD3D
(
&
surface
->
surface_desc
.
u4
.
ddpfPixelFormat
);
wined3d_desc
.
format
=
wined3dformat_from_ddrawformat
(
&
surface
->
surface_desc
.
u4
.
ddpfPixelFormat
);
wined3d_desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
wined3d_desc
.
multisample_quality
=
0
;
wined3d_desc
.
usage
=
0
;
...
...
@@ -5753,7 +5753,7 @@ HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw,
desc
->
ddsCaps
.
dwCaps
|=
DDSCAPS_LOCALVIDMEM
;
}
format
=
PixelFormat_DD2WineD3D
(
&
desc
->
u4
.
ddpfPixelFormat
);
format
=
wined3dformat_from_ddrawformat
(
&
desc
->
u4
.
ddpfPixelFormat
);
if
(
format
==
WINED3DFMT_UNKNOWN
)
{
WARN
(
"Unsupported / unknown pixelformat.
\n
"
);
...
...
dlls/ddraw/utils.c
View file @
86eb2111
...
...
@@ -349,20 +349,8 @@ void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, enum wined3d_format_i
DDRAW_dump_pixelformat
(
DDPixelFormat
);
}
}
/*****************************************************************************
* PixelFormat_DD2WineD3D
*
* Reads a DDPIXELFORMAT structure and returns the equivalent wined3d
* format ID.
*
* Params:
* DDPixelFormat: The source format
*
* Returns:
* The wined3d format ID equivalent to the DDraw format
* WINED3DFMT_UNKNOWN if a matching format wasn't found
*****************************************************************************/
enum
wined3d_format_id
PixelFormat_DD2WineD3D
(
const
DDPIXELFORMAT
*
DDPixelFormat
)
enum
wined3d_format_id
wined3dformat_from_ddrawformat
(
const
DDPIXELFORMAT
*
DDPixelFormat
)
{
TRACE
(
"Convert a DirectDraw Pixelformat to a WineD3D Pixelformat
\n
"
);
if
(
TRACE_ON
(
ddraw
))
...
...
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