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
22d41e2c
Commit
22d41e2c
authored
Nov 28, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Rename the wineD3D field in IDirectDrawImpl to wined3d.
parent
0f10ac93
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
21 deletions
+20
-21
ddraw.c
dlls/ddraw/ddraw.c
+14
-14
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-2
device.c
dlls/ddraw/device.c
+5
-5
No files found.
dlls/ddraw/ddraw.c
View file @
22d41e2c
...
...
@@ -486,7 +486,7 @@ static void ddraw_destroy(IDirectDrawImpl *This)
if
(
This
->
wined3d_swapchain
)
ddraw_destroy_swapchain
(
This
);
wined3d_device_decref
(
This
->
wined3d_device
);
wined3d_decref
(
This
->
wine
D3D
);
wined3d_decref
(
This
->
wine
d3d
);
/* Now free the object */
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
@@ -835,7 +835,7 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd,
{
struct
wined3d_display_mode
display_mode
;
wined3d_get_adapter_display_mode
(
This
->
wine
D3D
,
WINED3DADAPTER_DEFAULT
,
&
display_mode
);
wined3d_get_adapter_display_mode
(
This
->
wine
d3d
,
WINED3DADAPTER_DEFAULT
,
&
display_mode
);
wined3d_device_setup_fullscreen_window
(
This
->
wined3d_device
,
hwnd
,
display_mode
.
width
,
display_mode
.
height
);
}
...
...
@@ -1453,7 +1453,7 @@ static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes
for
(
i
=
0
;
i
<
(
sizeof
(
formats
)
/
sizeof
(
formats
[
0
]));
++
i
)
{
hr
=
wined3d_check_device_format
(
This
->
wine
D3D
,
WINED3DADAPTER_DEFAULT
,
WINED3DDEVTYPE_HAL
,
hr
=
wined3d_check_device_format
(
This
->
wine
d3d
,
WINED3DADAPTER_DEFAULT
,
WINED3DDEVTYPE_HAL
,
mode
.
format_id
,
0
,
WINED3DRTYPE_SURFACE
,
formats
[
i
],
DefaultSurfaceType
);
if
(
SUCCEEDED
(
hr
))
{
...
...
@@ -1652,7 +1652,7 @@ static HRESULT WINAPI ddraw7_GetAvailableVidMem(IDirectDraw7 *iface, DDSCAPS2 *C
{
struct
wined3d_adapter_identifier
desc
=
{
0
};
hr
=
wined3d_get_adapter_identifier
(
This
->
wine
D3D
,
WINED3DADAPTER_DEFAULT
,
0
,
&
desc
);
hr
=
wined3d_get_adapter_identifier
(
This
->
wine
d3d
,
WINED3DADAPTER_DEFAULT
,
0
,
&
desc
);
*
total
=
desc
.
video_memory
;
}
...
...
@@ -2135,7 +2135,7 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags,
for
(
fmt
=
0
;
fmt
<
(
sizeof
(
checkFormatList
)
/
sizeof
(
checkFormatList
[
0
]));
fmt
++
)
{
modenum
=
0
;
while
(
wined3d_enum_adapter_modes
(
This
->
wine
D3D
,
WINED3DADAPTER_DEFAULT
,
while
(
wined3d_enum_adapter_modes
(
This
->
wine
d3d
,
WINED3DADAPTER_DEFAULT
,
checkFormatList
[
fmt
],
modenum
++
,
&
mode
)
==
WINED3D_OK
)
{
PixelFormat_WineD3DtoDD
(
&
pixelformat
,
mode
.
format_id
);
...
...
@@ -3851,7 +3851,7 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
wined3d_mutex_lock
();
hr
=
IDirect3DImpl_GetCaps
(
This
->
wine
D3D
,
&
device_desc1
,
&
device_desc7
);
hr
=
IDirect3DImpl_GetCaps
(
This
->
wine
d3d
,
&
device_desc1
,
&
device_desc7
);
if
(
hr
!=
D3D_OK
)
{
wined3d_mutex_unlock
();
...
...
@@ -3918,7 +3918,7 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
wined3d_mutex_lock
();
hr
=
IDirect3DImpl_GetCaps
(
This
->
wine
D3D
,
&
device_desc1
,
&
device_desc7
);
hr
=
IDirect3DImpl_GetCaps
(
This
->
wine
d3d
,
&
device_desc1
,
&
device_desc7
);
if
(
hr
!=
D3D_OK
)
{
wined3d_mutex_unlock
();
...
...
@@ -4282,7 +4282,7 @@ static HRESULT WINAPI d3d3_FindDevice(IDirect3D3 *iface, D3DFINDDEVICESEARCH *fd
}
/* Get the caps */
hr
=
IDirect3DImpl_GetCaps
(
This
->
wine
D3D
,
&
desc1
,
&
desc7
);
hr
=
IDirect3DImpl_GetCaps
(
This
->
wine
d3d
,
&
desc1
,
&
desc7
);
if
(
hr
!=
D3D_OK
)
return
hr
;
/* Now return our own GUID */
...
...
@@ -4594,7 +4594,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
for
(
i
=
0
;
i
<
(
sizeof
(
formats
)
/
sizeof
(
*
formats
));
++
i
)
{
hr
=
wined3d_check_device_format
(
This
->
wine
D3D
,
WINED3DADAPTER_DEFAULT
,
type
,
mode
.
format_id
,
hr
=
wined3d_check_device_format
(
This
->
wine
d3d
,
WINED3DADAPTER_DEFAULT
,
type
,
mode
.
format_id
,
WINED3DUSAGE_DEPTHSTENCIL
,
WINED3DRTYPE_SURFACE
,
formats
[
i
],
SURFACE_OPENGL
);
if
(
SUCCEEDED
(
hr
))
{
...
...
@@ -4619,7 +4619,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
* while others used dwZBufferBitDepth=32. In either case the pitch matches a 32 bits per
* pixel format, so we use dwZBufferBitDepth=32. Some games expect 24. Windows Vista and
* newer enumerate both versions, so we do the same(bug 22434) */
hr
=
wined3d_check_device_format
(
This
->
wine
D3D
,
WINED3DADAPTER_DEFAULT
,
type
,
mode
.
format_id
,
hr
=
wined3d_check_device_format
(
This
->
wine
d3d
,
WINED3DADAPTER_DEFAULT
,
type
,
mode
.
format_id
,
WINED3DUSAGE_DEPTHSTENCIL
,
WINED3DRTYPE_SURFACE
,
WINED3DFMT_X8D24_UNORM
,
SURFACE_OPENGL
);
if
(
SUCCEEDED
(
hr
))
{
...
...
@@ -5455,20 +5455,20 @@ HRESULT ddraw_init(IDirectDrawImpl *ddraw, WINED3DDEVTYPE device_type)
ddraw
->
orig_width
=
GetSystemMetrics
(
SM_CXSCREEN
);
ddraw
->
orig_height
=
GetSystemMetrics
(
SM_CYSCREEN
);
ddraw
->
wine
D3D
=
wined3d_create
(
7
,
WINED3D_LEGACY_DEPTH_BIAS
,
ddraw
->
wine
d3d
=
wined3d_create
(
7
,
WINED3D_LEGACY_DEPTH_BIAS
,
&
ddraw
->
IDirectDraw7_iface
);
if
(
!
ddraw
->
wine
D3D
)
if
(
!
ddraw
->
wine
d3d
)
{
WARN
(
"Failed to create a wined3d object.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
wined3d_device_create
(
ddraw
->
wine
D3D
,
WINED3DADAPTER_DEFAULT
,
device_type
,
hr
=
wined3d_device_create
(
ddraw
->
wine
d3d
,
WINED3DADAPTER_DEFAULT
,
device_type
,
NULL
,
0
,
8
,
&
ddraw
->
device_parent
,
&
ddraw
->
wined3d_device
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create a wined3d device, hr %#x.
\n
"
,
hr
);
wined3d_decref
(
ddraw
->
wine
D3D
);
wined3d_decref
(
ddraw
->
wine
d3d
);
return
hr
;
}
...
...
dlls/ddraw/ddraw_private.h
View file @
22d41e2c
...
...
@@ -80,8 +80,7 @@ struct IDirectDrawImpl
LONG
ref7
,
ref4
,
ref2
,
ref3
,
ref1
,
numIfaces
;
BOOL
initialized
;
/* WineD3D linkage */
struct
wined3d
*
wineD3D
;
struct
wined3d
*
wined3d
;
struct
wined3d_device
*
wined3d_device
;
BOOL
d3d_initialized
;
...
...
dlls/ddraw/device.c
View file @
22d41e2c
...
...
@@ -460,7 +460,7 @@ IDirect3DDeviceImpl_7_GetCaps(IDirect3DDevice7 *iface,
TRACE
(
"iface %p, device_desc %p.
\n
"
,
iface
,
Desc
);
/* Call the same function used by IDirect3D, this saves code */
return
IDirect3DImpl_GetCaps
(
This
->
ddraw
->
wine
D3D
,
&
OldDesc
,
Desc
);
return
IDirect3DImpl_GetCaps
(
This
->
ddraw
->
wine
d3d
,
&
OldDesc
,
Desc
);
}
static
HRESULT
WINAPI
...
...
@@ -511,7 +511,7 @@ IDirect3DDeviceImpl_3_GetCaps(IDirect3DDevice3 *iface,
TRACE
(
"iface %p, hw_desc %p, hel_desc %p.
\n
"
,
iface
,
HWDesc
,
HelDesc
);
hr
=
IDirect3DImpl_GetCaps
(
This
->
ddraw
->
wine
D3D
,
HWDesc
,
&
newDesc
);
hr
=
IDirect3DImpl_GetCaps
(
This
->
ddraw
->
wine
d3d
,
HWDesc
,
&
newDesc
);
if
(
hr
!=
D3D_OK
)
return
hr
;
*
HelDesc
=
*
HWDesc
;
...
...
@@ -1103,7 +1103,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
*
FormatList
);
++
i
)
{
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wine
D3D
,
WINED3DADAPTER_DEFAULT
,
WINED3DDEVTYPE_HAL
,
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wine
d3d
,
WINED3DADAPTER_DEFAULT
,
WINED3DDEVTYPE_HAL
,
mode
.
format_id
,
0
,
WINED3DRTYPE_TEXTURE
,
FormatList
[
i
],
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
{
...
...
@@ -1126,7 +1126,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
for
(
i
=
0
;
i
<
sizeof
(
BumpFormatList
)
/
sizeof
(
*
BumpFormatList
);
++
i
)
{
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wine
D3D
,
WINED3DADAPTER_DEFAULT
,
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wine
d3d
,
WINED3DADAPTER_DEFAULT
,
WINED3DDEVTYPE_HAL
,
mode
.
format_id
,
WINED3DUSAGE_QUERY_LEGACYBUMPMAP
,
WINED3DRTYPE_TEXTURE
,
BumpFormatList
[
i
],
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
...
...
@@ -1240,7 +1240,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
*
FormatList
);
++
i
)
{
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wine
D3D
,
0
,
WINED3DDEVTYPE_HAL
,
hr
=
wined3d_check_device_format
(
This
->
ddraw
->
wine
d3d
,
0
,
WINED3DDEVTYPE_HAL
,
mode
.
format_id
,
0
,
WINED3DRTYPE_TEXTURE
,
FormatList
[
i
],
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
{
...
...
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