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
be77443b
Commit
be77443b
authored
Nov 22, 2023
by
Anton Baskanov
Committed by
Alexandre Julliard
Nov 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Don't queue messages with immediate delivery type.
parent
a6929a54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
23 deletions
+25
-23
performance.c
dlls/dmime/performance.c
+25
-23
No files found.
dlls/dmime/performance.c
View file @
be77443b
...
...
@@ -97,19 +97,6 @@ static inline struct message *message_from_DMUS_PMSG(DMUS_PMSG *msg)
return
msg
?
CONTAINING_RECORD
(
msg
,
struct
message
,
msg
)
:
NULL
;
}
static
void
performance_queue_message
(
struct
performance
*
This
,
struct
message
*
message
,
struct
list
*
hint
)
{
struct
message
*
prev
;
LIST_FOR_EACH_ENTRY_REV
(
prev
,
hint
?
hint
:
&
This
->
messages
,
struct
message
,
entry
)
{
if
(
&
prev
->
entry
==
&
This
->
messages
)
break
;
if
(
prev
->
msg
.
rtTime
<=
message
->
msg
.
rtTime
)
break
;
}
list_add_after
(
&
prev
->
entry
,
&
message
->
entry
);
}
static
struct
message
*
performance_get_message
(
struct
performance
*
This
,
DWORD
*
timeout
)
{
static
const
DWORD
delivery_flags
=
DMUS_PMSGF_TOOL_IMMEDIATE
|
DMUS_PMSGF_TOOL_QUEUE
|
DMUS_PMSGF_TOOL_ATTIME
;
...
...
@@ -129,8 +116,6 @@ static struct message *performance_get_message(struct performance *This, DWORD *
{
default:
WARN
(
"No delivery flag found for message %p
\n
"
,
&
message
->
msg
);
/* fallthrough */
case
DMUS_PMSGF_TOOL_IMMEDIATE
:
break
;
case
DMUS_PMSGF_TOOL_QUEUE
:
offset
=
This
->
dwBumperLength
*
10000
;
...
...
@@ -186,6 +171,30 @@ static HRESULT performance_process_message(struct performance *This, DMUS_PMSG *
return
hr
;
}
static
HRESULT
performance_queue_message
(
struct
performance
*
This
,
struct
message
*
message
,
struct
list
*
hint
)
{
static
const
DWORD
delivery_flags
=
DMUS_PMSGF_TOOL_IMMEDIATE
|
DMUS_PMSGF_TOOL_QUEUE
|
DMUS_PMSGF_TOOL_ATTIME
;
struct
message
*
prev
;
HRESULT
hr
;
while
((
message
->
msg
.
dwFlags
&
delivery_flags
)
==
DMUS_PMSGF_TOOL_IMMEDIATE
)
{
hr
=
performance_process_message
(
This
,
&
message
->
msg
);
if
(
hr
!=
DMUS_S_REQUEUE
)
return
hr
;
}
LIST_FOR_EACH_ENTRY_REV
(
prev
,
hint
?
hint
:
&
This
->
messages
,
struct
message
,
entry
)
{
if
(
&
prev
->
entry
==
&
This
->
messages
)
break
;
if
(
prev
->
msg
.
rtTime
<=
message
->
msg
.
rtTime
)
break
;
}
list_add_after
(
&
prev
->
entry
,
&
message
->
entry
);
return
S_OK
;
}
static
DWORD
WINAPI
message_thread_proc
(
void
*
args
)
{
struct
performance
*
This
=
args
;
...
...
@@ -856,14 +865,7 @@ static HRESULT WINAPI performance_SendPMsg(IDirectMusicPerformance8 *iface, DMUS
msg
->
dwFlags
|=
DMUS_PMSGF_REFTIME
;
}
if
(
msg
->
dwFlags
&
DMUS_PMSGF_TOOL_IMMEDIATE
)
{
hr
=
performance_process_message
(
This
,
&
message
->
msg
);
if
(
hr
!=
DMUS_S_REQUEUE
)
goto
done
;
}
performance_queue_message
(
This
,
message
,
NULL
);
hr
=
S_OK
;
hr
=
performance_queue_message
(
This
,
message
,
NULL
);
}
done:
...
...
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