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
98db0c75
Commit
98db0c75
authored
Sep 04, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Implement IDirectMusicGraph_StampPMsg.
parent
5d97483f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
20 deletions
+47
-20
graph.c
dlls/dmime/graph.c
+28
-1
dmime.c
dlls/dmime/tests/dmime.c
+19
-19
No files found.
dlls/dmime/graph.c
View file @
98db0c75
...
...
@@ -112,7 +112,34 @@ static ULONG WINAPI graph_Release(IDirectMusicGraph *iface)
static
HRESULT
WINAPI
graph_StampPMsg
(
IDirectMusicGraph
*
iface
,
DMUS_PMSG
*
msg
)
{
struct
graph
*
This
=
impl_from_IDirectMusicGraph
(
iface
);
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
msg
);
struct
tool_entry
*
entry
,
*
next
,
*
first
;
TRACE
(
"(%p, %p)
\n
"
,
This
,
msg
);
if
(
!
msg
)
return
E_POINTER
;
first
=
LIST_ENTRY
(
This
->
tools
.
next
,
struct
tool_entry
,
entry
);
LIST_FOR_EACH_ENTRY_SAFE
(
entry
,
next
,
&
This
->
tools
,
struct
tool_entry
,
entry
)
if
(
entry
->
tool
==
msg
->
pTool
)
break
;
if
(
&
entry
->
entry
==
&
This
->
tools
)
next
=
first
;
if
(
msg
->
pTool
)
{
IDirectMusicTool_Release
(
msg
->
pTool
);
msg
->
pTool
=
NULL
;
}
if
(
&
next
->
entry
==
&
This
->
tools
)
return
DMUS_S_LAST_TOOL
;
if
(
!
msg
->
pGraph
)
{
msg
->
pGraph
=
iface
;
IDirectMusicGraph_AddRef
(
msg
->
pGraph
);
}
msg
->
pTool
=
next
->
tool
;
IDirectMusicTool_AddRef
(
msg
->
pTool
);
return
S_OK
;
}
...
...
dlls/dmime/tests/dmime.c
View file @
98db0c75
...
...
@@ -746,12 +746,12 @@ static void test_graph(void)
/* Test basic IDirectMusicGraph_StampPMsg usage */
hr
=
IDirectMusicGraph_StampPMsg
(
graph
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"got %#lx
\n
"
,
hr
);
memset
(
&
msg
,
0
,
sizeof
(
msg
));
hr
=
IDirectMusicGraph_StampPMsg
(
graph
,
&
msg
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
todo_wine
ok
(
msg
.
pGraph
==
graph
,
"got %p
\n
"
,
msg
.
pGraph
);
todo_wine
ok
(
msg
.
pTool
==
tool1
,
"got %p
\n
"
,
msg
.
pTool
);
ok
(
msg
.
pGraph
==
graph
,
"got %p
\n
"
,
msg
.
pGraph
);
ok
(
msg
.
pTool
==
tool1
,
"got %p
\n
"
,
msg
.
pTool
);
ok
(
!
msg
.
dwSize
,
"got %ld
\n
"
,
msg
.
dwSize
);
ok
(
!
msg
.
rtTime
,
"got %I64d
\n
"
,
msg
.
rtTime
);
...
...
@@ -766,19 +766,19 @@ static void test_graph(void)
hr
=
IDirectMusicGraph_StampPMsg
(
graph
,
&
msg
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
todo_wine
ok
(
msg
.
pGraph
==
graph
,
"got %p
\n
"
,
msg
.
pGraph
);
todo_wine
ok
(
msg
.
pTool
==
tool2
,
"got %p
\n
"
,
msg
.
pTool
);
ok
(
msg
.
pGraph
==
graph
,
"got %p
\n
"
,
msg
.
pGraph
);
ok
(
msg
.
pTool
==
tool2
,
"got %p
\n
"
,
msg
.
pTool
);
hr
=
IDirectMusicGraph_StampPMsg
(
graph
,
&
msg
);
todo_wine
ok
(
hr
==
DMUS_S_LAST_TOOL
,
"got %#lx
\n
"
,
hr
);
todo_wine
ok
(
msg
.
pGraph
==
graph
,
"got %p
\n
"
,
msg
.
pGraph
);
ok
(
hr
==
DMUS_S_LAST_TOOL
,
"got %#lx
\n
"
,
hr
);
ok
(
msg
.
pGraph
==
graph
,
"got %p
\n
"
,
msg
.
pGraph
);
ok
(
!
msg
.
pTool
,
"got %p
\n
"
,
msg
.
pTool
);
hr
=
IDirectMusicGraph_StampPMsg
(
graph
,
&
msg
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
todo_wine
ok
(
msg
.
pGraph
==
graph
,
"got %p
\n
"
,
msg
.
pGraph
);
todo_wine
ok
(
msg
.
pTool
==
tool1
,
"got %p
\n
"
,
msg
.
pTool
);
if
(
msg
.
pGraph
)
IDirectMusicGraph_Release
(
msg
.
pGraph
);
ok
(
msg
.
pGraph
==
graph
,
"got %p
\n
"
,
msg
.
pGraph
);
ok
(
msg
.
pTool
==
tool1
,
"got %p
\n
"
,
msg
.
pTool
);
IDirectMusicGraph_Release
(
msg
.
pGraph
);
msg
.
pGraph
=
NULL
;
if
(
msg
.
pTool
)
IDirectMusicGraph_Release
(
msg
.
pTool
);
IDirectMusicGraph_Release
(
msg
.
pTool
);
msg
.
pTool
=
NULL
;
...
...
@@ -794,16 +794,16 @@ static void test_graph(void)
hr
=
IDirectMusicGraph_StampPMsg
(
graph
,
&
msg
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ok
(
msg
.
pGraph
==
tmp_graph
,
"got %p
\n
"
,
msg
.
pGraph
);
todo_wine
ok
(
msg
.
pTool
==
tool2
,
"got %p
\n
"
,
msg
.
pTool
);
if
(
msg
.
pGraph
)
IDirectMusicGraph_Release
(
msg
.
pGraph
);
ok
(
msg
.
pTool
==
tool2
,
"got %p
\n
"
,
msg
.
pTool
);
IDirectMusicGraph_Release
(
msg
.
pGraph
);
msg
.
pGraph
=
NULL
;
msg
.
pGraph
=
graph
;
IDirectMusicGraph_AddRef
(
msg
.
pGraph
);
hr
=
IDirectMusicGraph_StampPMsg
(
tmp_graph
,
&
msg
);
todo_wine
ok
(
hr
==
DMUS_S_LAST_TOOL
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_S_LAST_TOOL
,
"got %#lx
\n
"
,
hr
);
ok
(
msg
.
pGraph
==
graph
,
"got %p
\n
"
,
msg
.
pGraph
);
todo_wine
ok
(
msg
.
pTool
==
NULL
,
"got %p
\n
"
,
msg
.
pTool
);
ok
(
msg
.
pTool
==
NULL
,
"got %p
\n
"
,
msg
.
pTool
);
msg
.
pTool
=
tool2
;
IDirectMusicTool_AddRef
(
msg
.
pTool
);
...
...
@@ -814,16 +814,16 @@ static void test_graph(void)
hr
=
IDirectMusicGraph_StampPMsg
(
tmp_graph
,
&
msg
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ok
(
msg
.
pGraph
==
graph
,
"got %p
\n
"
,
msg
.
pGraph
);
todo_wine
ok
(
msg
.
pTool
==
tool1
,
"got %p
\n
"
,
msg
.
pTool
);
if
(
msg
.
pGraph
)
IDirectMusicGraph_Release
(
msg
.
pGraph
);
ok
(
msg
.
pTool
==
tool1
,
"got %p
\n
"
,
msg
.
pTool
);
IDirectMusicGraph_Release
(
msg
.
pGraph
);
msg
.
pGraph
=
NULL
;
hr
=
IDirectMusicGraph_RemoveTool
(
graph
,
tool1
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicGraph_StampPMsg
(
tmp_graph
,
&
msg
);
todo_wine
ok
(
hr
==
DMUS_S_LAST_TOOL
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
DMUS_S_LAST_TOOL
,
"got %#lx
\n
"
,
hr
);
ok
(
msg
.
pGraph
==
NULL
,
"got %p
\n
"
,
msg
.
pGraph
);
todo_wine
ok
(
msg
.
pTool
==
NULL
,
"got %p
\n
"
,
msg
.
pTool
);
ok
(
msg
.
pTool
==
NULL
,
"got %p
\n
"
,
msg
.
pTool
);
IDirectMusicGraph_Release
(
tmp_graph
);
...
...
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