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
bb67a925
Commit
bb67a925
authored
Aug 21, 2008
by
David Adam
Committed by
Alexandre Julliard
Aug 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Only ddraw checks wether one can give a null pointer to SetMaterial.
parent
f0a821a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
device.c
dlls/ddraw/device.c
+1
-0
d3d.c
dlls/ddraw/tests/d3d.c
+9
-0
device.c
dlls/wined3d/device.c
+0
-2
No files found.
dlls/ddraw/device.c
View file @
bb67a925
...
...
@@ -5543,6 +5543,7 @@ IDirect3DDeviceImpl_7_SetMaterial(IDirect3DDevice7 *iface,
HRESULT
hr
;
TRACE
(
"(%p)->(%p): Relay!
\n
"
,
This
,
Mat
);
if
(
!
Mat
)
return
DDERR_INVALIDPARAMS
;
/* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_SetMaterial
(
This
->
wineD3DDevice
,
...
...
dlls/ddraw/tests/d3d.c
View file @
bb67a925
...
...
@@ -2735,6 +2735,14 @@ static void DeviceLoadTest()
}
}
static
void
SetMaterialTest
(
void
)
{
HRESULT
rc
;
rc
=
IDirect3DDevice7_SetMaterial
(
lpD3DDevice
,
NULL
);
ok
(
rc
==
DDERR_INVALIDPARAMS
,
"Expected DDERR_INVALIDPARAMS, got %x
\n
"
,
rc
);
}
START_TEST
(
d3d
)
{
init_function_pointers
();
...
...
@@ -2752,6 +2760,7 @@ START_TEST(d3d)
SceneTest
();
LimitTest
();
D3D7EnumTest
();
SetMaterialTest
();
CapsTest
();
VertexBufferDescTest
();
D3D7_OldRenderStateTest
();
...
...
dlls/wined3d/device.c
View file @
bb67a925
...
...
@@ -3144,8 +3144,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetClipStatus(IWineD3DDevice *iface,
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetMaterial
(
IWineD3DDevice
*
iface
,
CONST
WINED3DMATERIAL
*
pMaterial
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
if
(
!
pMaterial
)
return
WINED3DERR_INVALIDCALL
;
This
->
updateStateBlock
->
changed
.
material
=
TRUE
;
This
->
updateStateBlock
->
material
=
*
pMaterial
;
...
...
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