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
ddec94bf
Commit
ddec94bf
authored
Aug 27, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Pass proper parameters to CheckDeviceFormat.
parent
c1eabc2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
11 deletions
+35
-11
device.c
dlls/ddraw/device.c
+35
-11
No files found.
dlls/ddraw/device.c
View file @
ddec94bf
...
@@ -1164,6 +1164,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
...
@@ -1164,6 +1164,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
{
{
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice7
,
iface
);
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice7
,
iface
);
HRESULT
hr
;
HRESULT
hr
;
WINED3DDISPLAYMODE
mode
;
int
i
;
int
i
;
WINED3DFORMAT
FormatList
[]
=
{
WINED3DFORMAT
FormatList
[]
=
{
...
@@ -1202,14 +1203,25 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
...
@@ -1202,14 +1203,25 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
return
DDERR_INVALIDPARAMS
;
return
DDERR_INVALIDPARAMS
;
EnterCriticalSection
(
&
ddraw_cs
);
EnterCriticalSection
(
&
ddraw_cs
);
memset
(
&
mode
,
0
,
sizeof
(
mode
));
hr
=
IWineD3DDevice_GetDisplayMode
(
This
->
ddraw
->
wineD3DDevice
,
0
,
&
mode
);
if
(
FAILED
(
hr
))
{
LeaveCriticalSection
(
&
ddraw_cs
);
WARN
(
"Cannot get the current adapter format
\n
"
);
return
hr
;
}
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
WINED3DFORMAT
);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
WINED3DFORMAT
);
i
++
)
{
{
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
ddraw
->
wineD3D
,
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
ddraw
->
wineD3D
,
0
/* Adapter */
,
WINED3DADAPTER_DEFAULT
,
0
/* DeviceType */
,
WINED3DDEVTYPE_HAL
,
0
/* AdapterFormat */
,
mode
.
Format
,
0
/* Usage */
,
0
/* Usage */
,
0
/* ResourceType */
,
WINED3DRTYPE_TEXTURE
,
FormatList
[
i
],
FormatList
[
i
],
SURFACE_OPENGL
);
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
if
(
hr
==
D3D_OK
)
...
@@ -1234,11 +1246,11 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
...
@@ -1234,11 +1246,11 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
for
(
i
=
0
;
i
<
sizeof
(
BumpFormatList
)
/
sizeof
(
WINED3DFORMAT
);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
BumpFormatList
)
/
sizeof
(
WINED3DFORMAT
);
i
++
)
{
{
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
ddraw
->
wineD3D
,
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
ddraw
->
wineD3D
,
0
/* Adapter */
,
WINED3DADAPTER_DEFAULT
,
0
/* DeviceType */
,
WINED3DDEVTYPE_HAL
,
0
/* AdapterFormat */
,
mode
.
Format
,
WINED3DUSAGE_QUERY_LEGACYBUMPMAP
,
WINED3DUSAGE_QUERY_LEGACYBUMPMAP
,
0
/* ResourceType */
,
WINED3DRTYPE_TEXTURE
,
BumpFormatList
[
i
],
BumpFormatList
[
i
],
SURFACE_OPENGL
);
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
if
(
hr
==
D3D_OK
)
...
@@ -1317,6 +1329,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
...
@@ -1317,6 +1329,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice2
,
iface
);
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice2
,
iface
);
HRESULT
hr
;
HRESULT
hr
;
int
i
;
int
i
;
WINED3DDISPLAYMODE
mode
;
WINED3DFORMAT
FormatList
[]
=
{
WINED3DFORMAT
FormatList
[]
=
{
/* 32 bit */
/* 32 bit */
...
@@ -1341,14 +1354,25 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
...
@@ -1341,14 +1354,25 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
return
DDERR_INVALIDPARAMS
;
return
DDERR_INVALIDPARAMS
;
EnterCriticalSection
(
&
ddraw_cs
);
EnterCriticalSection
(
&
ddraw_cs
);
memset
(
&
mode
,
0
,
sizeof
(
mode
));
hr
=
IWineD3DDevice_GetDisplayMode
(
This
->
ddraw
->
wineD3DDevice
,
0
,
&
mode
);
if
(
FAILED
(
hr
))
{
LeaveCriticalSection
(
&
ddraw_cs
);
WARN
(
"Cannot get the current adapter format
\n
"
);
return
hr
;
}
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
WINED3DFORMAT
);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
FormatList
)
/
sizeof
(
WINED3DFORMAT
);
i
++
)
{
{
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
ddraw
->
wineD3D
,
hr
=
IWineD3D_CheckDeviceFormat
(
This
->
ddraw
->
wineD3D
,
0
/* Adapter */
,
0
/* Adapter */
,
0
/* DeviceType */
,
WINED3DDEVTYPE_HAL
,
0
/* AdapterFormat */
,
mode
.
Format
,
0
/* Usage */
,
0
/* Usage */
,
0
/* ResourceType */
,
WINED3DRTYPE_TEXTURE
,
FormatList
[
i
],
FormatList
[
i
],
SURFACE_OPENGL
);
SURFACE_OPENGL
);
if
(
hr
==
D3D_OK
)
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