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
4151acb4
Commit
4151acb4
authored
Jul 26, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jul 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Unacquire only DISCL_FOREGROUND devices on foreground changes.
Fixes broken input in Final Fantasy XIII after main window focus loss.
parent
fd2ddf8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dinput_main.c
dlls/dinput/dinput_main.c
+3
-3
No files found.
dlls/dinput/dinput_main.c
View file @
4151acb4
...
...
@@ -142,7 +142,7 @@ static LRESULT CALLBACK input_thread_ll_hook_proc( int code, WPARAM wparam, LPAR
return
skip
?
1
:
CallNextHookEx
(
0
,
code
,
wparam
,
lparam
);
}
static
void
dinput_unacquire_window_devices
(
HWND
window
)
static
void
handle_foreground_lost
(
HWND
window
)
{
struct
dinput_device
*
impl
,
*
next
;
...
...
@@ -150,7 +150,7 @@ static void dinput_unacquire_window_devices( HWND window )
LIST_FOR_EACH_ENTRY_SAFE
(
impl
,
next
,
&
acquired_device_list
,
struct
dinput_device
,
entry
)
{
if
(
window
!=
impl
->
win
)
continue
;
if
(
!
(
impl
->
dwCoopLevel
&
DISCL_FOREGROUND
)
||
window
!=
impl
->
win
)
continue
;
TRACE
(
"%p window is not foreground - unacquiring %p
\n
"
,
impl
->
win
,
impl
);
dinput_device_internal_unacquire
(
&
impl
->
IDirectInputDevice8W_iface
,
STATUS_UNACQUIRED
);
}
...
...
@@ -325,7 +325,7 @@ static LRESULT WINAPI di_em_win_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPAR
input_thread_update_device_list
(
state
);
break
;
case
NOTIFY_FOREGROUND_LOST
:
dinput_unacquire_window_devices
(
(
HWND
)
lparam
);
handle_foreground_lost
(
(
HWND
)
lparam
);
break
;
}
...
...
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