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
0a93c69b
Commit
0a93c69b
authored
Sep 05, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Rename DMUS_PMSGToItem to message_from_DMUS_PMSG.
parent
61ebdbcb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
performance.c
dlls/dmime/performance.c
+15
-15
No files found.
dlls/dmime/performance.c
View file @
0a93c69b
...
...
@@ -72,10 +72,13 @@ struct performance
struct
message
{
struct
list
entry
;
DMUS_PMSG
pM
sg
;
DMUS_PMSG
m
sg
;
};
#define DMUS_PMSGToItem(pMSG) ((struct message *)(((unsigned char *)pMSG) - offsetof(struct message, pMsg)))
static
inline
struct
message
*
message_from_DMUS_PMSG
(
DMUS_PMSG
*
msg
)
{
return
msg
?
CONTAINING_RECORD
(
msg
,
struct
message
,
msg
)
:
NULL
;
}
#define PROCESSMSG_START (WM_APP + 0)
#define PROCESSMSG_EXIT (WM_APP + 1)
...
...
@@ -85,17 +88,17 @@ struct message
static
struct
message
*
ProceedMsg
(
struct
performance
*
This
,
struct
message
*
cur
)
{
if
(
cur
->
pM
sg
.
dwType
==
DMUS_PMSGT_NOTIFICATION
)
{
if
(
cur
->
m
sg
.
dwType
==
DMUS_PMSGT_NOTIFICATION
)
{
SetEvent
(
This
->
hNotification
);
}
list_remove
(
&
cur
->
entry
);
list_init
(
&
cur
->
entry
);
switch
(
cur
->
pM
sg
.
dwType
)
{
switch
(
cur
->
m
sg
.
dwType
)
{
case
DMUS_PMSGT_WAVE
:
case
DMUS_PMSGT_TEMPO
:
case
DMUS_PMSGT_STOP
:
default:
FIXME
(
"Unhandled PMsg Type: %#lx
\n
"
,
cur
->
pM
sg
.
dwType
);
FIXME
(
"Unhandled PMsg Type: %#lx
\n
"
,
cur
->
m
sg
.
dwType
);
break
;
}
return
cur
;
...
...
@@ -130,8 +133,8 @@ static DWORD WINAPI ProcessMsgThread(LPVOID lpParam) {
LIST_FOR_EACH_ENTRY_SAFE
(
message
,
next
,
&
This
->
queued_messages
,
struct
message
,
entry
)
{
timeOut
=
(
message
->
pM
sg
.
rtTime
-
rtCurTime
)
+
This
->
rtLatencyTime
;
if
(
message
->
pM
sg
.
rtTime
>=
rtCurTime
+
dwDec
)
break
;
timeOut
=
(
message
->
m
sg
.
rtTime
-
rtCurTime
)
+
This
->
rtLatencyTime
;
if
(
message
->
m
sg
.
rtTime
>=
rtCurTime
+
dwDec
)
break
;
cur
=
ProceedMsg
(
This
,
message
);
free
(
cur
);
}
...
...
@@ -393,15 +396,13 @@ static HRESULT WINAPI performance_SendPMsg(IDirectMusicPerformance8 *iface, DMUS
FIXME
(
"(%p, %p): semi-stub
\n
"
,
This
,
msg
);
if
(
!
msg
)
return
E_POINTER
;
if
(
!
(
message
=
message_from_DMUS_PMSG
(
msg
))
)
return
E_POINTER
;
if
(
!
This
->
dmusic
)
return
DMUS_E_NO_MASTER_CLOCK
;
if
(
!
(
msg
->
dwFlags
&
(
DMUS_PMSGF_MUSICTIME
|
DMUS_PMSGF_REFTIME
)))
return
E_INVALIDARG
;
if
(
msg
->
dwFlags
&
DMUS_PMSGF_TOOL_IMMEDIATE
)
queue
=
&
This
->
immediate_messages
;
else
queue
=
&
This
->
queued_messages
;
message
=
DMUS_PMSGToItem
(
msg
);
EnterCriticalSection
(
&
This
->
safe
);
if
(
!
list_empty
(
&
message
->
entry
))
...
...
@@ -424,7 +425,7 @@ static HRESULT WINAPI performance_SendPMsg(IDirectMusicPerformance8 *iface, DMUS
}
LIST_FOR_EACH_ENTRY
(
next
,
queue
,
struct
message
,
entry
)
if
(
next
->
pMsg
.
rtTime
>=
message
->
pM
sg
.
rtTime
)
break
;
if
(
next
->
msg
.
rtTime
>=
message
->
m
sg
.
rtTime
)
break
;
list_add_before
(
&
next
->
entry
,
&
message
->
entry
);
hr
=
S_OK
;
...
...
@@ -511,9 +512,9 @@ static HRESULT WINAPI performance_AllocPMsg(IDirectMusicPerformance8 *iface, ULO
if
(
size
<
sizeof
(
DMUS_PMSG
))
return
E_INVALIDARG
;
if
(
!
(
message
=
calloc
(
1
,
size
-
sizeof
(
DMUS_PMSG
)
+
sizeof
(
struct
message
))))
return
E_OUTOFMEMORY
;
message
->
pM
sg
.
dwSize
=
size
;
message
->
m
sg
.
dwSize
=
size
;
list_init
(
&
message
->
entry
);
*
msg
=
&
message
->
pM
sg
;
*
msg
=
&
message
->
m
sg
;
return
S_OK
;
}
...
...
@@ -526,8 +527,7 @@ static HRESULT WINAPI performance_FreePMsg(IDirectMusicPerformance8 *iface, DMUS
TRACE
(
"(%p, %p)
\n
"
,
This
,
msg
);
if
(
!
msg
)
return
E_POINTER
;
message
=
DMUS_PMSGToItem
(
msg
);
if
(
!
(
message
=
message_from_DMUS_PMSG
(
msg
)))
return
E_POINTER
;
EnterCriticalSection
(
&
This
->
safe
);
hr
=
!
list_empty
(
&
message
->
entry
)
?
DMUS_E_CANNOT_FREE
:
S_OK
;
...
...
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