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
faa269c4
Commit
faa269c4
authored
Jul 08, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use unsafe_impl_from_IDirect3DExecuteBuffer for an app provided iface.
parent
663483e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-0
device.c
dlls/ddraw/device.c
+5
-8
executebuffer.c
dlls/ddraw/executebuffer.c
+9
-0
No files found.
dlls/ddraw/ddraw_private.h
View file @
faa269c4
...
...
@@ -508,6 +508,7 @@ struct IDirect3DExecuteBufferImpl
HRESULT
d3d_execute_buffer_init
(
IDirect3DExecuteBufferImpl
*
execute_buffer
,
IDirect3DDeviceImpl
*
device
,
D3DEXECUTEBUFFERDESC
*
desc
)
DECLSPEC_HIDDEN
;
IDirect3DExecuteBufferImpl
*
unsafe_impl_from_IDirect3DExecuteBuffer
(
IDirect3DExecuteBuffer
*
iface
)
DECLSPEC_HIDDEN
;
/* The execute function */
HRESULT
d3d_execute_buffer_execute
(
IDirect3DExecuteBufferImpl
*
execute_buffer
,
...
...
dlls/ddraw/device.c
View file @
faa269c4
...
...
@@ -707,25 +707,22 @@ IDirect3DDeviceImpl_1_CreateExecuteBuffer(IDirect3DDevice *iface,
* D3D_OK on success
*
*****************************************************************************/
static
HRESULT
WINAPI
IDirect3DDeviceImpl_1_Execute
(
IDirect3DDevice
*
iface
,
IDirect3DExecuteBuffer
*
ExecuteBuffer
,
IDirect3DViewport
*
Viewport
,
DWORD
Flags
)
static
HRESULT
WINAPI
IDirect3DDeviceImpl_1_Execute
(
IDirect3DDevice
*
iface
,
IDirect3DExecuteBuffer
*
ExecuteBuffer
,
IDirect3DViewport
*
Viewport
,
DWORD
Flags
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device1
(
iface
);
IDirect3DExecuteBufferImpl
*
Direct3DExecuteBufferImpl
=
(
IDirect3DExecuteBufferImpl
*
)
ExecuteBuffer
;
IDirect3DExecuteBufferImpl
*
buffer
=
unsafe_impl_from_IDirect3DExecuteBuffer
(
ExecuteBuffer
)
;
IDirect3DViewportImpl
*
Direct3DViewportImpl
=
(
IDirect3DViewportImpl
*
)
Viewport
;
HRESULT
hr
;
TRACE
(
"iface %p, buffer %p, viewport %p, flags %#x.
\n
"
,
iface
,
ExecuteBuffer
,
Viewport
,
Flags
);
if
(
!
Direct3DExecuteBufferImpl
)
if
(
!
buffer
)
return
DDERR_INVALIDPARAMS
;
/* Execute... */
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
d3d_execute_buffer_execute
(
Direct3DExecuteBufferImpl
,
This
,
Direct3DViewportImpl
);
hr
=
d3d_execute_buffer_execute
(
buffer
,
This
,
Direct3DViewportImpl
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
...
...
dlls/ddraw/executebuffer.c
View file @
faa269c4
...
...
@@ -870,3 +870,12 @@ HRESULT d3d_execute_buffer_init(IDirect3DExecuteBufferImpl *execute_buffer,
return
D3D_OK
;
}
IDirect3DExecuteBufferImpl
*
unsafe_impl_from_IDirect3DExecuteBuffer
(
IDirect3DExecuteBuffer
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
d3d_execute_buffer_vtbl
);
return
impl_from_IDirect3DExecuteBuffer
(
iface
);
}
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