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
6ed40bb2
Commit
6ed40bb2
authored
Dec 24, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass the correct instance when installing the mouse hook (spotted by
Lionel Ulmer).
parent
74c3eab2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
dinput_main.c
dlls/dinput/dinput_main.c
+3
-0
dinput_private.h
dlls/dinput/dinput_private.h
+2
-0
main.c
dlls/dinput/mouse/main.c
+1
-1
No files found.
dlls/dinput/dinput_main.c
View file @
6ed40bb2
...
...
@@ -50,11 +50,14 @@ static ICOM_VTABLE(IDirectInput8A) ddi8avt;
static
dinput_device
*
dinput_devices
[
MAX_WINE_DINPUT_DEVICES
];
static
int
nrof_dinput_devices
=
0
;
HINSTANCE
DINPUT_instance
=
NULL
;
BOOL
WINAPI
DllMain
(
HINSTANCE
inst
,
DWORD
reason
,
LPVOID
reserv
)
{
switch
(
reason
)
{
case
DLL_PROCESS_ATTACH
:
DINPUT_instance
=
inst
;
keyboard_hook
=
SetWindowsHookExW
(
WH_KEYBOARD_LL
,
KeyboardCallback
,
inst
,
0
);
break
;
case
DLL_PROCESS_DETACH
:
...
...
dlls/dinput/dinput_private.h
View file @
6ed40bb2
...
...
@@ -46,4 +46,6 @@ HHOOK keyboard_hook;
LRESULT
CALLBACK
KeyboardCallback
(
int
code
,
WPARAM
wparam
,
LPARAM
lparam
);
extern
HINSTANCE
DINPUT_instance
;
#endif
/* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */
dlls/dinput/mouse/main.c
View file @
6ed40bb2
...
...
@@ -527,7 +527,7 @@ static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
/* Install our mouse hook */
if
(
This
->
dwCoopLevel
&
DISCL_EXCLUSIVE
)
ShowCursor
(
FALSE
);
/* hide cursor */
This
->
hook
=
SetWindowsHookEx
W
(
WH_MOUSE_LL
,
dinput_mouse_hook
,
0
,
0
);
This
->
hook
=
SetWindowsHookEx
A
(
WH_MOUSE_LL
,
dinput_mouse_hook
,
DINPUT_instance
,
0
);
/* Get the window dimension and find the center */
GetWindowRect
(
This
->
win
,
&
rect
);
...
...
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