Module: wine Branch: master Commit: 3743a1a7ca170c765cd779c61b9e362c5b1c5203 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3743a1a7ca170c765cd779c61b...
Author: Vitaliy Margolen wine-patches@kievinfo.com Date: Sun Feb 1 13:11:46 2009 -0700
dinput: Consume mouse & keyboard events in exclusive mode.
---
dlls/dinput/dinput_main.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 46e4e28..bdcf557 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -885,6 +885,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) static LRESULT CALLBACK LL_hook_proc( int code, WPARAM wparam, LPARAM lparam ) { IDirectInputImpl *dinput; + int skip = 0;
if (code != HC_ACTION) return CallNextHookEx( 0, code, wparam, lparam );
@@ -899,12 +900,13 @@ static LRESULT CALLBACK LL_hook_proc( int code, WPARAM wparam, LPARAM lparam ) { TRACE("calling %p->%p (%lx %lx)\n", dev, dev->event_proc, wparam, lparam); dev->event_proc( (LPDIRECTINPUTDEVICE8A)dev, wparam, lparam ); + skip |= dev->dwCoopLevel & DISCL_EXCLUSIVE; } LeaveCriticalSection( &dinput->crit ); } LeaveCriticalSection( &dinput_hook_crit );
- return CallNextHookEx( 0, code, wparam, lparam ); + return skip ? 1 : CallNextHookEx( 0, code, wparam, lparam ); }
static LRESULT CALLBACK callwndproc_proc( int code, WPARAM wparam, LPARAM lparam )