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
4adeeb72
Commit
4adeeb72
authored
Sep 05, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Cleanup IDirectMusicPerformance_FreePMsg.
parent
9d600ce1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
27 deletions
+20
-27
performance.c
dlls/dmime/performance.c
+20
-27
No files found.
dlls/dmime/performance.c
View file @
4adeeb72
...
@@ -80,7 +80,7 @@ struct DMUS_PMSGItem {
...
@@ -80,7 +80,7 @@ struct DMUS_PMSGItem {
DMUS_PMSG
pMsg
;
DMUS_PMSG
pMsg
;
};
};
#define DMUS_PMSGToItem(pMSG) ((DMUS_PMSGItem
*) (((unsigned char*) pPMSG) -
offsetof(DMUS_PMSGItem, pMsg)))
#define DMUS_PMSGToItem(pMSG) ((DMUS_PMSGItem
*)(((unsigned char *)pMSG) -
offsetof(DMUS_PMSGItem, pMsg)))
#define DMUS_ItemRemoveFromQueue(This,pItem) \
#define DMUS_ItemRemoveFromQueue(This,pItem) \
{\
{\
if (pItem->prev) pItem->prev->next = pItem->next;\
if (pItem->prev) pItem->prev->next = pItem->next;\
...
@@ -531,37 +531,30 @@ static HRESULT WINAPI performance_AllocPMsg(IDirectMusicPerformance8 *iface, ULO
...
@@ -531,37 +531,30 @@ static HRESULT WINAPI performance_AllocPMsg(IDirectMusicPerformance8 *iface, ULO
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
performance_FreePMsg
(
IDirectMusicPerformance8
*
iface
,
DMUS_PMSG
*
pPMSG
)
static
HRESULT
WINAPI
performance_FreePMsg
(
IDirectMusicPerformance8
*
iface
,
DMUS_PMSG
*
msg
)
{
{
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
DMUS_PMSGItem
*
pItem
=
NULL
;
DMUS_PMSGItem
*
message
;
HRESULT
hr
;
FIXME
(
"(%p, %p): stub
\n
"
,
This
,
pPMSG
);
if
(
NULL
==
pPMSG
)
{
return
E_POINTER
;
}
pItem
=
DMUS_PMSGToItem
(
pPMSG
);
if
(
pItem
->
bInUse
)
{
/** prevent for freeing PMsg in queue (ie to be processed) */
return
DMUS_E_CANNOT_FREE
;
}
/** now we can remove it safely */
EnterCriticalSection
(
&
This
->
safe
);
DMUS_ItemRemoveFromQueue
(
This
,
pItem
);
LeaveCriticalSection
(
&
This
->
safe
);
if
(
pPMSG
->
pTool
)
TRACE
(
"(%p, %p)
\n
"
,
This
,
msg
);
IDirectMusicTool_Release
(
pPMSG
->
pTool
);
if
(
pPMSG
->
pGraph
)
if
(
!
msg
)
return
E_POINTER
;
IDirectMusicGraph_Release
(
pPMSG
->
pGraph
);
message
=
DMUS_PMSGToItem
(
msg
);
if
(
pPMSG
->
punkUser
)
EnterCriticalSection
(
&
This
->
safe
);
IUnknown_Release
(
pPMSG
->
punkUser
);
hr
=
message
->
bInUse
?
DMUS_E_CANNOT_FREE
:
S_OK
;
LeaveCriticalSection
(
&
This
->
safe
);
free
(
pItem
);
if
(
SUCCEEDED
(
hr
))
return
S_OK
;
{
if
(
msg
->
pTool
)
IDirectMusicTool_Release
(
msg
->
pTool
);
if
(
msg
->
pGraph
)
IDirectMusicGraph_Release
(
msg
->
pGraph
);
if
(
msg
->
punkUser
)
IUnknown_Release
(
msg
->
punkUser
);
free
(
message
);
}
return
hr
;
}
}
static
HRESULT
WINAPI
performance_GetGraph
(
IDirectMusicPerformance8
*
iface
,
IDirectMusicGraph
**
graph
)
static
HRESULT
WINAPI
performance_GetGraph
(
IDirectMusicPerformance8
*
iface
,
IDirectMusicGraph
**
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