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
0a355d8a
Commit
0a355d8a
authored
Jan 22, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jan 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Cleanup low-level hooks on input thread exit.
parent
721437b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
dinput_main.c
dlls/dinput/dinput_main.c
+5
-12
No files found.
dlls/dinput/dinput_main.c
View file @
0a355d8a
...
...
@@ -282,9 +282,9 @@ static void input_thread_update_device_list( struct input_thread_state *state )
static
DWORD
WINAPI
dinput_thread_proc
(
void
*
params
)
{
HANDLE
finished_event
,
start_event
=
params
;
struct
input_thread_state
state
=
{
0
};
struct
dinput_device
*
device
;
HANDLE
start_event
=
params
;
DWORD
ret
;
MSG
msg
;
...
...
@@ -320,22 +320,13 @@ static DWORD WINAPI dinput_thread_proc( void *params )
continue
;
}
finished_event
=
(
HANDLE
)
msg
.
lParam
;
TRACE
(
"Processing hook change notification wparam %#Ix, lparam %#Ix.
\n
"
,
msg
.
wParam
,
msg
.
lParam
);
if
(
!
msg
.
wParam
)
{
if
(
state
.
keyboard_ll_hook
)
UnhookWindowsHookEx
(
state
.
keyboard_ll_hook
);
if
(
state
.
mouse_ll_hook
)
UnhookWindowsHookEx
(
state
.
mouse_ll_hook
);
state
.
keyboard_ll_hook
=
state
.
mouse_ll_hook
=
NULL
;
goto
done
;
}
if
(
!
msg
.
wParam
)
goto
done
;
while
(
state
.
devices_count
--
)
dinput_device_internal_release
(
state
.
devices
[
state
.
devices_count
]
);
input_thread_update_device_list
(
&
state
);
SetEvent
(
finished_event
);
SetEvent
(
(
HANDLE
)
msg
.
lParam
);
}
}
...
...
@@ -343,6 +334,8 @@ static DWORD WINAPI dinput_thread_proc( void *params )
done:
while
(
state
.
devices_count
--
)
dinput_device_internal_release
(
state
.
devices
[
state
.
devices_count
]
);
if
(
state
.
keyboard_ll_hook
)
UnhookWindowsHookEx
(
state
.
keyboard_ll_hook
);
if
(
state
.
mouse_ll_hook
)
UnhookWindowsHookEx
(
state
.
mouse_ll_hook
);
DestroyWindow
(
di_em_win
);
di_em_win
=
NULL
;
return
0
;
...
...
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