Alexandre Julliard : kernel32: Use PeekMessageW instead of UserYield.
Alexandre Julliard
julliard at winehq.org
Fri Nov 13 09:37:01 CST 2009
Module: wine
Branch: master
Commit: 18ddbc1c7d69c358042873d174482dbb8e9f6787
URL: http://source.winehq.org/git/wine.git/?a=commit;h=18ddbc1c7d69c358042873d174482dbb8e9f6787
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Nov 12 21:54:15 2009 +0100
kernel32: Use PeekMessageW instead of UserYield.
---
dlls/kernel32/task.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/kernel32/task.c b/dlls/kernel32/task.c
index 2987420..1bcf211 100644
--- a/dlls/kernel32/task.c
+++ b/dlls/kernel32/task.c
@@ -819,10 +819,12 @@ void WINAPI Yield16(void)
HMODULE mod = GetModuleHandleA( "user32.dll" );
if (mod)
{
- FARPROC proc = GetProcAddress( mod, "UserYield16" );
- if (proc)
+ BOOL (WINAPI *pPeekMessageW)( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags );
+ pPeekMessageW = (void *)GetProcAddress( mod, "PeekMessageW" );
+ if (pPeekMessageW)
{
- proc();
+ MSG msg;
+ pPeekMessageW( &msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE );
return;
}
}
More information about the wine-cvs
mailing list