Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9a43c410
Commit
9a43c410
authored
Nov 12, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Use PeekMessageW instead of UserYield.
parent
910f331f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
19 deletions
+4
-19
mci.c
dlls/winmm/mci.c
+4
-19
No files found.
dlls/winmm/mci.c
View file @
9a43c410
...
...
@@ -2131,37 +2131,21 @@ UINT WINAPI mciGetDeviceIDW(LPCWSTR lpwstrName)
return
MCI_GetDriverFromString
(
lpwstrName
);
}
/******************************************************************
* MyUserYield
*
* Internal wrapper to call USER.UserYield16 (in fact through a Wine only export from USER32).
*/
static
void
MyUserYield
(
void
)
{
HMODULE
mod
=
GetModuleHandleA
(
"user32.dll"
);
if
(
mod
)
{
FARPROC
proc
=
GetProcAddress
(
mod
,
"UserYield16"
);
if
(
proc
)
proc
();
}
}
/**************************************************************************
* MCI_DefYieldProc [internal]
*/
static
UINT
WINAPI
MCI_DefYieldProc
(
MCIDEVICEID
wDevID
,
DWORD
data
)
{
INT16
ret
;
MSG
msg
;
TRACE
(
"(0x%04x, 0x%08x)
\n
"
,
wDevID
,
data
);
if
((
HIWORD
(
data
)
!=
0
&&
HWND_16
(
GetActiveWindow
())
!=
HIWORD
(
data
))
||
(
GetAsyncKeyState
(
LOWORD
(
data
))
&
1
)
==
0
)
{
MyUserYield
(
);
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
|
PM_QS_SENDMESSAGE
);
ret
=
0
;
}
else
{
MSG
msg
;
msg
.
hwnd
=
HWND_32
(
HIWORD
(
data
));
while
(
!
PeekMessageW
(
&
msg
,
msg
.
hwnd
,
WM_KEYFIRST
,
WM_KEYLAST
,
PM_REMOVE
));
ret
=
-
1
;
...
...
@@ -2263,7 +2247,8 @@ UINT WINAPI mciDriverYield(MCIDEVICEID uDeviceID)
TRACE
(
"(%04x)
\n
"
,
uDeviceID
);
if
(
!
(
wmd
=
MCI_GetDriver
(
uDeviceID
))
||
!
wmd
->
lpfnYieldProc
)
{
MyUserYield
();
MSG
msg
;
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
|
PM_QS_SENDMESSAGE
);
}
else
{
ret
=
wmd
->
lpfnYieldProc
(
uDeviceID
,
wmd
->
dwYieldData
);
}
...
...
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