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
cd7d2dc1
Commit
cd7d2dc1
authored
Apr 04, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Enforce ColorFill restrictions.
parent
fd97acba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
device.c
dlls/d3d9/device.c
+19
-0
No files found.
dlls/d3d9/device.c
View file @
cd7d2dc1
...
...
@@ -624,9 +624,28 @@ static HRESULT WINAPI IDirect3DDevice9Impl_StretchRect(LPDIRECT3DDEVICE9EX ifa
static
HRESULT
WINAPI
IDirect3DDevice9Impl_ColorFill
(
LPDIRECT3DDEVICE9EX
iface
,
IDirect3DSurface9
*
pSurface
,
CONST
RECT
*
pRect
,
D3DCOLOR
color
)
{
IDirect3DDevice9Impl
*
This
=
(
IDirect3DDevice9Impl
*
)
iface
;
IDirect3DSurface9Impl
*
surface
=
(
IDirect3DSurface9Impl
*
)
pSurface
;
WINED3DPOOL
pool
;
WINED3DRESOURCETYPE
restype
;
DWORD
usage
;
WINED3DSURFACE_DESC
desc
;
HRESULT
hr
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
memset
(
&
desc
,
0
,
sizeof
(
desc
));
desc
.
Usage
=
&
usage
;
desc
.
Pool
=
&
pool
;
desc
.
Type
=
&
restype
;
IWineD3DSurface_GetDesc
(
surface
->
wineD3DSurface
,
&
desc
);
/* This method is only allowed with surfaces that are render targets, or offscreen plain surfaces
* in D3DPOOL_DEFAULT
*/
if
(
!
(
usage
&
WINED3DUSAGE_RENDERTARGET
)
&&
(
pool
!=
D3DPOOL_DEFAULT
||
restype
!=
D3DRTYPE_SURFACE
))
{
WARN
(
"Surface is not a render target, or not a stand-alone D3DPOOL_DEFAULT surface
\n
"
);
return
D3DERR_INVALIDCALL
;
}
/* Colorfill can only be used on rendertarget surfaces, or offscreen plain surfaces in D3DPOOL_DEFAULT */
/* Note: D3DRECT is compatible with WINED3DRECT */
EnterCriticalSection
(
&
d3d9_cs
);
hr
=
IWineD3DDevice_ColorFill
(
This
->
WineD3DDevice
,
surface
->
wineD3DSurface
,
(
CONST
WINED3DRECT
*
)
pRect
,
color
);
...
...
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