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
8c882f68
Commit
8c882f68
authored
Jun 05, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Avoid LPDIRECT3DRMFRAMEARRAY.
parent
31f9cae2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
55 deletions
+53
-55
frame.c
dlls/d3drm/frame.c
+5
-7
d3drm.c
dlls/d3drm/tests/d3drm.c
+45
-45
d3drmobj.h
include/d3drmobj.h
+3
-3
No files found.
dlls/d3drm/frame.c
View file @
8c882f68
...
...
@@ -685,14 +685,13 @@ static HRESULT WINAPI IDirect3DRMFrame2Impl_AddVisual(IDirect3DRMFrame2 *iface,
return
IDirect3DRMFrame3_AddVisual
(
&
frame
->
IDirect3DRMFrame3_iface
,
(
IUnknown
*
)
visual
);
}
static
HRESULT
WINAPI
IDirect3DRMFrame2Impl_GetChildren
(
IDirect3DRMFrame2
*
iface
,
LPDIRECT3DRMFRAMEARRAY
*
children
)
static
HRESULT
WINAPI
IDirect3DRMFrame2Impl_GetChildren
(
IDirect3DRMFrame2
*
iface
,
IDirect3DRMFrameArray
**
children
)
{
IDirect3DRMFrameImpl
*
This
=
impl_from_IDirect3DRMFrame2
(
iface
);
IDirect3DRMFrameImpl
*
frame
=
impl_from_IDirect3DRMFrame2
(
iface
);
TRACE
(
"
(%p/%p)->(%p)
\n
"
,
iface
,
This
,
children
);
TRACE
(
"
iface %p, children %p.
\n
"
,
iface
,
children
);
return
IDirect3DRMFrame3_GetChildren
(
&
This
->
IDirect3DRMFrame3_iface
,
children
);
return
IDirect3DRMFrame3_GetChildren
(
&
frame
->
IDirect3DRMFrame3_iface
,
children
);
}
static
D3DCOLOR
WINAPI
IDirect3DRMFrame2Impl_GetColor
(
IDirect3DRMFrame2
*
iface
)
...
...
@@ -1683,8 +1682,7 @@ static HRESULT WINAPI IDirect3DRMFrame3Impl_AddVisual(IDirect3DRMFrame3* iface,
return
D3DRM_OK
;
}
static
HRESULT
WINAPI
IDirect3DRMFrame3Impl_GetChildren
(
IDirect3DRMFrame3
*
iface
,
LPDIRECT3DRMFRAMEARRAY
*
children
)
static
HRESULT
WINAPI
IDirect3DRMFrame3Impl_GetChildren
(
IDirect3DRMFrame3
*
iface
,
IDirect3DRMFrameArray
**
children
)
{
IDirect3DRMFrameImpl
*
This
=
impl_from_IDirect3DRMFrame3
(
iface
);
IDirect3DRMFrameArrayImpl
*
obj
;
...
...
dlls/d3drm/tests/d3drm.c
View file @
8c882f68
...
...
@@ -911,7 +911,7 @@ static void test_Frame(void)
IDirect3DRMFrame
*
pFrameP1
;
IDirect3DRMFrame
*
pFrameP2
;
IDirect3DRMFrame
*
pFrameTmp
;
LPDIRECT3DRMFRAMEARRAY
pA
rray
;
IDirect3DRMFrameArray
*
frame_a
rray
;
IDirect3DRMMeshBuilder
*
mesh_builder
;
IDirect3DRMVisual
*
visual1
;
IDirect3DRMVisual
*
visual_tmp
;
...
...
@@ -951,18 +951,18 @@ static void test_Frame(void)
ok
(
pFrameTmp
==
NULL
,
"pFrameTmp = %p
\n
"
,
pFrameTmp
);
CHECK_REFCOUNT
(
pFrameC
,
1
);
pA
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameC
,
&
pA
rray
);
frame_a
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameC
,
&
frame_a
rray
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get children (hr = %x)
\n
"
,
hr
);
ok
(
pArray
!=
NULL
,
"pArray = %p
\n
"
,
pA
rray
);
if
(
pA
rray
)
ok
(
!!
frame_array
,
"frame_array = %p
\n
"
,
frame_a
rray
);
if
(
frame_a
rray
)
{
count
=
IDirect3DRMFrameArray_GetSize
(
pA
rray
);
count
=
IDirect3DRMFrameArray_GetSize
(
frame_a
rray
);
ok
(
count
==
0
,
"count = %u
\n
"
,
count
);
hr
=
IDirect3DRMFrameArray_GetElement
(
pA
rray
,
0
,
&
pFrameTmp
);
hr
=
IDirect3DRMFrameArray_GetElement
(
frame_a
rray
,
0
,
&
pFrameTmp
);
ok
(
hr
==
D3DRMERR_BADVALUE
,
"Should have returned D3DRMERR_BADVALUE (hr = %x)
\n
"
,
hr
);
ok
(
pFrameTmp
==
NULL
,
"pFrameTmp = %p
\n
"
,
pFrameTmp
);
IDirect3DRMFrameArray_Release
(
pA
rray
);
IDirect3DRMFrameArray_Release
(
frame_a
rray
);
}
hr
=
IDirect3DRM_CreateFrame
(
d3drm
,
NULL
,
&
pFrameP1
);
...
...
@@ -993,17 +993,17 @@ static void test_Frame(void)
CHECK_REFCOUNT
(
pFrameP1
,
1
);
CHECK_REFCOUNT
(
pFrameC
,
2
);
pA
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP1
,
&
pA
rray
);
frame_a
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP1
,
&
frame_a
rray
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get children (hr = %x)
\n
"
,
hr
);
/* In some older version of d3drm, creating IDirect3DRMFrameArray object with GetChildren does not increment refcount of children frames */
ok
((
get_refcount
((
IUnknown
*
)
pFrameC
)
==
3
)
||
broken
(
get_refcount
((
IUnknown
*
)
pFrameC
)
==
2
),
"Invalid refcount. Expected 3 (or 2) got %d
\n
"
,
get_refcount
((
IUnknown
*
)
pFrameC
));
if
(
pA
rray
)
if
(
frame_a
rray
)
{
count
=
IDirect3DRMFrameArray_GetSize
(
pA
rray
);
count
=
IDirect3DRMFrameArray_GetSize
(
frame_a
rray
);
ok
(
count
==
1
,
"count = %u
\n
"
,
count
);
hr
=
IDirect3DRMFrameArray_GetElement
(
pA
rray
,
0
,
&
pFrameTmp
);
hr
=
IDirect3DRMFrameArray_GetElement
(
frame_a
rray
,
0
,
&
pFrameTmp
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get element (hr = %x)
\n
"
,
hr
);
ok
(
pFrameTmp
==
pFrameC
,
"pFrameTmp = %p
\n
"
,
pFrameTmp
);
ok
((
get_refcount
((
IUnknown
*
)
pFrameC
)
==
4
)
||
broken
(
get_refcount
((
IUnknown
*
)
pFrameC
)
==
3
),
...
...
@@ -1011,7 +1011,7 @@ static void test_Frame(void)
IDirect3DRMFrame_Release
(
pFrameTmp
);
ok
((
get_refcount
((
IUnknown
*
)
pFrameC
)
==
3
)
||
broken
(
get_refcount
((
IUnknown
*
)
pFrameC
)
==
2
),
"Invalid refcount. Expected 3 (or 2) got %d
\n
"
,
get_refcount
((
IUnknown
*
)
pFrameC
));
IDirect3DRMFrameArray_Release
(
pA
rray
);
IDirect3DRMFrameArray_Release
(
frame_a
rray
);
CHECK_REFCOUNT
(
pFrameC
,
2
);
}
...
...
@@ -1029,32 +1029,32 @@ static void test_Frame(void)
ok
(
hr
==
D3DRM_OK
,
"Cannot add child frame (hr = %x)
\n
"
,
hr
);
CHECK_REFCOUNT
(
pFrameC
,
2
);
pA
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP2
,
&
pA
rray
);
frame_a
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP2
,
&
frame_a
rray
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get children (hr = %x)
\n
"
,
hr
);
if
(
pA
rray
)
if
(
frame_a
rray
)
{
count
=
IDirect3DRMFrameArray_GetSize
(
pA
rray
);
count
=
IDirect3DRMFrameArray_GetSize
(
frame_a
rray
);
ok
(
count
==
1
,
"count = %u
\n
"
,
count
);
hr
=
IDirect3DRMFrameArray_GetElement
(
pA
rray
,
0
,
&
pFrameTmp
);
hr
=
IDirect3DRMFrameArray_GetElement
(
frame_a
rray
,
0
,
&
pFrameTmp
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get element (hr = %x)
\n
"
,
hr
);
ok
(
pFrameTmp
==
pFrameC
,
"pFrameTmp = %p
\n
"
,
pFrameTmp
);
IDirect3DRMFrame_Release
(
pFrameTmp
);
IDirect3DRMFrameArray_Release
(
pA
rray
);
IDirect3DRMFrameArray_Release
(
frame_a
rray
);
}
pA
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP1
,
&
pA
rray
);
frame_a
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP1
,
&
frame_a
rray
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get children (hr = %x)
\n
"
,
hr
);
if
(
pA
rray
)
if
(
frame_a
rray
)
{
count
=
IDirect3DRMFrameArray_GetSize
(
pA
rray
);
count
=
IDirect3DRMFrameArray_GetSize
(
frame_a
rray
);
ok
(
count
==
0
,
"count = %u
\n
"
,
count
);
pFrameTmp
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DRMFrameArray_GetElement
(
pA
rray
,
0
,
&
pFrameTmp
);
hr
=
IDirect3DRMFrameArray_GetElement
(
frame_a
rray
,
0
,
&
pFrameTmp
);
ok
(
hr
==
D3DRMERR_BADVALUE
,
"Should have returned D3DRMERR_BADVALUE (hr = %x)
\n
"
,
hr
);
ok
(
pFrameTmp
==
NULL
,
"pFrameTmp = %p
\n
"
,
pFrameTmp
);
IDirect3DRMFrameArray_Release
(
pA
rray
);
IDirect3DRMFrameArray_Release
(
frame_a
rray
);
}
pFrameTmp
=
(
void
*
)
0xdeadbeef
;
...
...
@@ -1069,18 +1069,18 @@ static void test_Frame(void)
ok
(
hr
==
D3DRM_OK
,
"Cannot add child frame (hr = %x)
\n
"
,
hr
);
CHECK_REFCOUNT
(
pFrameC
,
2
);
pA
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP2
,
&
pA
rray
);
frame_a
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP2
,
&
frame_a
rray
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get children (hr = %x)
\n
"
,
hr
);
if
(
pA
rray
)
if
(
frame_a
rray
)
{
count
=
IDirect3DRMFrameArray_GetSize
(
pA
rray
);
count
=
IDirect3DRMFrameArray_GetSize
(
frame_a
rray
);
ok
(
count
==
1
,
"count = %u
\n
"
,
count
);
hr
=
IDirect3DRMFrameArray_GetElement
(
pA
rray
,
0
,
&
pFrameTmp
);
hr
=
IDirect3DRMFrameArray_GetElement
(
frame_a
rray
,
0
,
&
pFrameTmp
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get element (hr = %x)
\n
"
,
hr
);
ok
(
pFrameTmp
==
pFrameC
,
"pFrameTmp = %p
\n
"
,
pFrameTmp
);
IDirect3DRMFrame_Release
(
pFrameTmp
);
IDirect3DRMFrameArray_Release
(
pA
rray
);
IDirect3DRMFrameArray_Release
(
frame_a
rray
);
}
/* Delete child */
...
...
@@ -1088,18 +1088,18 @@ static void test_Frame(void)
ok
(
hr
==
D3DRM_OK
,
"Cannot delete child frame (hr = %x)
\n
"
,
hr
);
CHECK_REFCOUNT
(
pFrameC
,
1
);
pA
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP2
,
&
pA
rray
);
frame_a
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP2
,
&
frame_a
rray
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get children (hr = %x)
\n
"
,
hr
);
if
(
pA
rray
)
if
(
frame_a
rray
)
{
count
=
IDirect3DRMFrameArray_GetSize
(
pA
rray
);
count
=
IDirect3DRMFrameArray_GetSize
(
frame_a
rray
);
ok
(
count
==
0
,
"count = %u
\n
"
,
count
);
pFrameTmp
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DRMFrameArray_GetElement
(
pA
rray
,
0
,
&
pFrameTmp
);
hr
=
IDirect3DRMFrameArray_GetElement
(
frame_a
rray
,
0
,
&
pFrameTmp
);
ok
(
hr
==
D3DRMERR_BADVALUE
,
"Should have returned D3DRMERR_BADVALUE (hr = %x)
\n
"
,
hr
);
ok
(
pFrameTmp
==
NULL
,
"pFrameTmp = %p
\n
"
,
pFrameTmp
);
IDirect3DRMFrameArray_Release
(
pA
rray
);
IDirect3DRMFrameArray_Release
(
frame_a
rray
);
}
pFrameTmp
=
(
void
*
)
0xdeadbeef
;
...
...
@@ -1116,22 +1116,22 @@ static void test_Frame(void)
ok
(
hr
==
D3DRM_OK
,
"Cannot add child frame (hr = %x)
\n
"
,
hr
);
CHECK_REFCOUNT
(
pFrameP1
,
3
);
pA
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP2
,
&
pA
rray
);
frame_a
rray
=
NULL
;
hr
=
IDirect3DRMFrame_GetChildren
(
pFrameP2
,
&
frame_a
rray
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get children (hr = %x)
\n
"
,
hr
);
if
(
pA
rray
)
if
(
frame_a
rray
)
{
count
=
IDirect3DRMFrameArray_GetSize
(
pA
rray
);
count
=
IDirect3DRMFrameArray_GetSize
(
frame_a
rray
);
ok
(
count
==
2
,
"count = %u
\n
"
,
count
);
hr
=
IDirect3DRMFrameArray_GetElement
(
pA
rray
,
0
,
&
pFrameTmp
);
hr
=
IDirect3DRMFrameArray_GetElement
(
frame_a
rray
,
0
,
&
pFrameTmp
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get element (hr = %x)
\n
"
,
hr
);
ok
(
pFrameTmp
==
pFrameC
,
"pFrameTmp = %p
\n
"
,
pFrameTmp
);
IDirect3DRMFrame_Release
(
pFrameTmp
);
hr
=
IDirect3DRMFrameArray_GetElement
(
pA
rray
,
1
,
&
pFrameTmp
);
hr
=
IDirect3DRMFrameArray_GetElement
(
frame_a
rray
,
1
,
&
pFrameTmp
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get element (hr = %x)
\n
"
,
hr
);
ok
(
pFrameTmp
==
pFrameP1
,
"pFrameTmp = %p
\n
"
,
pFrameTmp
);
IDirect3DRMFrame_Release
(
pFrameTmp
);
IDirect3DRMFrameArray_Release
(
pA
rray
);
IDirect3DRMFrameArray_Release
(
frame_a
rray
);
}
/* [Add/Delete]Visual with NULL pointer */
...
...
include/d3drmobj.h
View file @
8c882f68
...
...
@@ -1104,7 +1104,7 @@ DECLARE_INTERFACE_(IDirect3DRMFrame,IDirect3DRMVisual)
STDMETHOD
(
AddScale
)(
THIS_
D3DRMCOMBINETYPE
,
D3DVALUE
sx
,
D3DVALUE
sy
,
D3DVALUE
sz
)
PURE
;
STDMETHOD
(
AddRotation
)(
THIS_
D3DRMCOMBINETYPE
,
D3DVALUE
x
,
D3DVALUE
y
,
D3DVALUE
z
,
D3DVALUE
theta
)
PURE
;
STDMETHOD
(
AddVisual
)(
THIS_
IDirect3DRMVisual
*
visual
)
PURE
;
STDMETHOD
(
GetChildren
)(
THIS_
LPDIRECT3DRMFRAMEARRAY
*
children
)
PURE
;
STDMETHOD
(
GetChildren
)(
THIS_
struct
IDirect3DRMFrameArray
*
*
children
)
PURE
;
STDMETHOD_
(
D3DCOLOR
,
GetColor
)(
THIS
)
PURE
;
STDMETHOD
(
GetLights
)(
THIS_
LPDIRECT3DRMLIGHTARRAY
*
lights
)
PURE
;
STDMETHOD_
(
D3DRMMATERIALMODE
,
GetMaterialMode
)(
THIS
)
PURE
;
...
...
@@ -1337,7 +1337,7 @@ DECLARE_INTERFACE_(IDirect3DRMFrame2,IDirect3DRMFrame)
STDMETHOD
(
AddScale
)(
THIS_
D3DRMCOMBINETYPE
,
D3DVALUE
sx
,
D3DVALUE
sy
,
D3DVALUE
sz
)
PURE
;
STDMETHOD
(
AddRotation
)(
THIS_
D3DRMCOMBINETYPE
,
D3DVALUE
x
,
D3DVALUE
y
,
D3DVALUE
z
,
D3DVALUE
theta
)
PURE
;
STDMETHOD
(
AddVisual
)(
THIS_
IDirect3DRMVisual
*
visual
)
PURE
;
STDMETHOD
(
GetChildren
)(
THIS_
LPDIRECT3DRMFRAMEARRAY
*
children
)
PURE
;
STDMETHOD
(
GetChildren
)(
THIS_
struct
IDirect3DRMFrameArray
*
*
children
)
PURE
;
STDMETHOD_
(
D3DCOLOR
,
GetColor
)(
THIS
)
PURE
;
STDMETHOD
(
GetLights
)(
THIS_
LPDIRECT3DRMLIGHTARRAY
*
lights
)
PURE
;
STDMETHOD_
(
D3DRMMATERIALMODE
,
GetMaterialMode
)(
THIS
)
PURE
;
...
...
@@ -1619,7 +1619,7 @@ DECLARE_INTERFACE_(IDirect3DRMFrame3,IDirect3DRMVisual)
STDMETHOD
(
AddScale
)(
THIS_
D3DRMCOMBINETYPE
,
D3DVALUE
sx
,
D3DVALUE
sy
,
D3DVALUE
sz
)
PURE
;
STDMETHOD
(
AddRotation
)(
THIS_
D3DRMCOMBINETYPE
,
D3DVALUE
x
,
D3DVALUE
y
,
D3DVALUE
z
,
D3DVALUE
theta
)
PURE
;
STDMETHOD
(
AddVisual
)(
THIS_
LPUNKNOWN
)
PURE
;
STDMETHOD
(
GetChildren
)(
THIS_
LPDIRECT3DRMFRAMEARRAY
*
children
)
PURE
;
STDMETHOD
(
GetChildren
)(
THIS_
struct
IDirect3DRMFrameArray
*
*
children
)
PURE
;
STDMETHOD_
(
D3DCOLOR
,
GetColor
)(
THIS
)
PURE
;
STDMETHOD
(
GetLights
)(
THIS_
LPDIRECT3DRMLIGHTARRAY
*
lights
)
PURE
;
STDMETHOD_
(
D3DRMMATERIALMODE
,
GetMaterialMode
)(
THIS
)
PURE
;
...
...
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