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
15f16e8f
Commit
15f16e8f
authored
Jul 29, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Jul 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use unsafe_impl_from_IDirect3DTexture2 for application provided interfaces.
parent
91a1ed8b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-0
device.c
dlls/ddraw/device.c
+3
-3
surface.c
dlls/ddraw/surface.c
+8
-1
No files found.
dlls/ddraw/ddraw_private.h
View file @
15f16e8f
...
...
@@ -254,6 +254,7 @@ IDirectDrawSurfaceImpl *unsafe_impl_from_IDirectDrawSurface4(IDirectDrawSurface4
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface7
(
IDirectDrawSurface7
*
iface
)
DECLSPEC_HIDDEN
;
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirect3DTexture
(
IDirect3DTexture
*
iface
)
DECLSPEC_HIDDEN
;
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirect3DTexture2
(
IDirect3DTexture2
*
iface
)
DECLSPEC_HIDDEN
;
/* Get the number of bytes per pixel for a given surface */
#define PFGET_BPP(pf) (pf.dwFlags&DDPF_PALETTEINDEXED8?1:((pf.dwRGBBitCount+7)/8))
...
...
dlls/ddraw/device.c
View file @
15f16e8f
...
...
@@ -544,8 +544,8 @@ IDirect3DDeviceImpl_2_SwapTextureHandles(IDirect3DDevice2 *iface,
IDirect3DTexture2
*
Tex2
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device2
(
iface
);
IDirectDrawSurfaceImpl
*
surf1
=
surface_from_t
exture2
(
Tex1
);
IDirectDrawSurfaceImpl
*
surf2
=
surface_from_t
exture2
(
Tex2
);
IDirectDrawSurfaceImpl
*
surf1
=
unsafe_impl_from_IDirect3DT
exture2
(
Tex1
);
IDirectDrawSurfaceImpl
*
surf2
=
unsafe_impl_from_IDirect3DT
exture2
(
Tex2
);
DWORD
h1
,
h2
;
TRACE
(
"iface %p, tex1 %p, tex2 %p.
\n
"
,
iface
,
Tex1
,
Tex2
);
...
...
@@ -4564,7 +4564,7 @@ IDirect3DDeviceImpl_3_SetTexture(IDirect3DDevice3 *iface,
IDirect3DTexture2
*
Texture2
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device3
(
iface
);
IDirectDrawSurfaceImpl
*
tex
=
Texture2
?
surface_from_texture2
(
Texture2
)
:
NULL
;
IDirectDrawSurfaceImpl
*
tex
=
unsafe_impl_from_IDirect3DTexture2
(
Texture2
)
;
DWORD
texmapblend
;
HRESULT
hr
;
...
...
dlls/ddraw/surface.c
View file @
15f16e8f
...
...
@@ -4572,7 +4572,7 @@ static IDirectDrawSurfaceImpl *get_sub_mimaplevel(IDirectDrawSurfaceImpl *surfac
static
HRESULT
WINAPI
d3d_texture2_Load
(
IDirect3DTexture2
*
iface
,
IDirect3DTexture2
*
src_texture
)
{
IDirectDrawSurfaceImpl
*
dst_surface
=
surface_from_texture2
(
iface
);
IDirectDrawSurfaceImpl
*
src_surface
=
surface_from_t
exture2
(
src_texture
);
IDirectDrawSurfaceImpl
*
src_surface
=
unsafe_impl_from_IDirect3DT
exture2
(
src_texture
);
HRESULT
hr
;
TRACE
(
"iface %p, src_texture %p.
\n
"
,
iface
,
src_texture
);
...
...
@@ -5030,6 +5030,13 @@ IDirectDrawSurfaceImpl *unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirectDrawSurface_iface
);
}
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirect3DTexture2
(
IDirect3DTexture2
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
d3d_texture2_vtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirect3DTexture2_vtbl
);
}
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirect3DTexture
(
IDirect3DTexture
*
iface
)
{
if
(
!
iface
)
return
NULL
;
...
...
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