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
495e3288
Commit
495e3288
authored
May 18, 2012
by
Christian Costa
Committed by
Alexandre Julliard
May 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmusic: Cleanup IDirectMusicCollection_GetInstrument.
parent
82f3b86c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
collection.c
dlls/dmusic/collection.c
+16
-16
No files found.
dlls/dmusic/collection.c
View file @
495e3288
...
...
@@ -103,27 +103,27 @@ static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_Release(LP
}
/* IDirectMusicCollection Interface follows: */
static
HRESULT
WINAPI
IDirectMusicCollectionImpl_IDirectMusicCollection_GetInstrument
(
LPDIRECTMUSICCOLLECTION
iface
,
DWORD
dwPatch
,
IDirectMusicInstrument
**
ppI
nstrument
)
static
HRESULT
WINAPI
IDirectMusicCollectionImpl_IDirectMusicCollection_GetInstrument
(
LPDIRECTMUSICCOLLECTION
iface
,
DWORD
patch
,
IDirectMusicInstrument
**
i
nstrument
)
{
IDirectMusicCollectionImpl
*
This
=
impl_from_IDirectMusicCollection
(
iface
);
DMUS_PRIVATE_INSTRUMENTENTRY
*
tmpE
ntry
;
struct
list
*
listE
ntry
;
DWORD
dwInstP
atch
;
TRACE
(
"(%p, %d, %p)
\n
"
,
This
,
dwPatch
,
ppI
nstrument
);
LIST_FOR_EACH
(
listE
ntry
,
&
This
->
Instruments
)
{
tmpEntry
=
LIST_ENTRY
(
listE
ntry
,
DMUS_PRIVATE_INSTRUMENTENTRY
,
entry
);
IDirectMusicInstrument_GetPatch
(
tmpEntry
->
pInstrument
,
&
dwInstP
atch
);
if
(
dwPatch
==
dwInstP
atch
)
{
*
ppInstrument
=
tmpE
ntry
->
pInstrument
;
IDirectMusicInstrument_AddRef
(
tmpE
ntry
->
pInstrument
);
IDirectMusicInstrumentImpl_Custom_Load
(
tmpEntry
->
pInstrument
,
This
->
pStm
);
/* load instrument before returning it */
TRACE
(
": returning instrument %p
\n
"
,
*
ppI
nstrument
);
DMUS_PRIVATE_INSTRUMENTENTRY
*
inst_e
ntry
;
struct
list
*
list_e
ntry
;
DWORD
inst_p
atch
;
TRACE
(
"(%p/%p)->(%u, %p)
\n
"
,
iface
,
This
,
patch
,
i
nstrument
);
LIST_FOR_EACH
(
list_e
ntry
,
&
This
->
Instruments
)
{
inst_entry
=
LIST_ENTRY
(
list_e
ntry
,
DMUS_PRIVATE_INSTRUMENTENTRY
,
entry
);
IDirectMusicInstrument_GetPatch
(
inst_entry
->
pInstrument
,
&
inst_p
atch
);
if
(
patch
==
inst_p
atch
)
{
*
instrument
=
inst_e
ntry
->
pInstrument
;
IDirectMusicInstrument_AddRef
(
inst_e
ntry
->
pInstrument
);
IDirectMusicInstrumentImpl_Custom_Load
(
inst_entry
->
pInstrument
,
This
->
pStm
);
TRACE
(
": returning instrument %p
\n
"
,
*
i
nstrument
);
return
S_OK
;
}
}
TRACE
(
": instrument not found
\n
"
);
return
DMUS_E_INVALIDPATCH
;
...
...
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