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
ae7531f6
Commit
ae7531f6
authored
Nov 06, 2019
by
Huw Davies
Committed by
Alexandre Julliard
Nov 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Remove unused GetAsyncKeyState() driver entry.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f4d6df89
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
50 deletions
+32
-50
driver.c
dlls/user32/driver.c
+0
-13
input.c
dlls/user32/input.c
+32
-36
user_private.h
dlls/user32/user_private.h
+0
-1
No files found.
dlls/user32/driver.c
View file @
ae7531f6
...
...
@@ -106,7 +106,6 @@ static const USER_DRIVER *load_driver(void)
GET_USER_FUNC
(
ActivateKeyboardLayout
);
GET_USER_FUNC
(
Beep
);
GET_USER_FUNC
(
GetAsyncKeyState
);
GET_USER_FUNC
(
GetKeyNameText
);
GET_USER_FUNC
(
GetKeyboardLayout
);
GET_USER_FUNC
(
GetKeyboardLayoutList
);
...
...
@@ -206,11 +205,6 @@ static void CDECL nulldrv_Beep(void)
{
}
static
SHORT
CDECL
nulldrv_GetAsyncKeyState
(
INT
key
)
{
return
-
1
;
}
static
UINT
CDECL
nulldrv_GetKeyboardLayoutList
(
INT
size
,
HKL
*
layouts
)
{
HKEY
hKeyKeyboard
;
...
...
@@ -494,7 +488,6 @@ static USER_DRIVER null_driver =
/* keyboard functions */
nulldrv_ActivateKeyboardLayout
,
nulldrv_Beep
,
nulldrv_GetAsyncKeyState
,
nulldrv_GetKeyNameText
,
nulldrv_GetKeyboardLayout
,
nulldrv_GetKeyboardLayoutList
,
...
...
@@ -566,11 +559,6 @@ static void CDECL loaderdrv_Beep(void)
load_driver
()
->
pBeep
();
}
static
SHORT
CDECL
loaderdrv_GetAsyncKeyState
(
INT
key
)
{
return
load_driver
()
->
pGetAsyncKeyState
(
key
);
}
static
INT
CDECL
loaderdrv_GetKeyNameText
(
LONG
lparam
,
LPWSTR
buffer
,
INT
size
)
{
return
load_driver
()
->
pGetKeyNameText
(
lparam
,
buffer
,
size
);
...
...
@@ -715,7 +703,6 @@ static USER_DRIVER lazy_load_driver =
/* keyboard functions */
loaderdrv_ActivateKeyboardLayout
,
loaderdrv_Beep
,
loaderdrv_GetAsyncKeyState
,
loaderdrv_GetKeyNameText
,
loaderdrv_GetKeyboardLayout
,
loaderdrv_GetKeyboardLayoutList
,
...
...
dlls/user32/input.c
View file @
ae7531f6
...
...
@@ -401,51 +401,47 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
check_for_events
(
QS_INPUT
);
if
((
ret
=
USER_Driver
->
pGetAsyncKeyState
(
key
))
==
-
1
)
if
(
key_state_info
&&
!
(
key_state_info
->
state
[
key
]
&
0xc0
)
&&
key_state_info
->
counter
==
counter
&&
GetTickCount
()
-
key_state_info
->
time
<
50
)
{
if
(
key_state_info
&&
!
(
key_state_info
->
state
[
key
]
&
0xc0
)
&&
key_state_info
->
counter
==
counter
&&
GetTickCount
()
-
key_state_info
->
time
<
50
)
{
/* use cached value */
return
0
;
}
else
if
(
!
key_state_info
)
/* use cached value */
return
0
;
}
else
if
(
!
key_state_info
)
{
key_state_info
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
key_state_info
)
);
get_user_thread_info
()
->
key_state
=
key_state_info
;
}
ret
=
0
;
SERVER_START_REQ
(
get_key_state
)
{
req
->
tid
=
0
;
req
->
key
=
key
;
if
(
key_state_info
)
{
key_state_info
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
key_state_info
)
)
;
get_user_thread_info
()
->
key_state
=
key_state_info
;
prev_key_state
=
key_state_info
->
state
[
key
]
;
wine_server_set_reply
(
req
,
key_state_info
->
state
,
sizeof
(
key_state_info
->
state
)
)
;
}
ret
=
0
;
SERVER_START_REQ
(
get_key_state
)
if
(
!
wine_server_call
(
req
))
{
req
->
tid
=
0
;
req
->
key
=
key
;
if
(
reply
->
state
&
0x40
)
ret
|=
0x0001
;
if
(
reply
->
state
&
0x80
)
ret
|=
0x8000
;
if
(
key_state_info
)
{
prev_key_state
=
key_state_info
->
state
[
key
];
wine_server_set_reply
(
req
,
key_state_info
->
state
,
sizeof
(
key_state_info
->
state
)
);
}
if
(
!
wine_server_call
(
req
))
{
if
(
reply
->
state
&
0x40
)
ret
|=
0x0001
;
if
(
reply
->
state
&
0x80
)
ret
|=
0x8000
;
if
(
key_state_info
)
{
/* force refreshing the key state cache - some multithreaded programs
* (like Adobe Photoshop CS5) expect that changes to the async key state
* are also immediately available in other threads. */
if
(
prev_key_state
!=
key_state_info
->
state
[
key
])
counter
=
interlocked_xchg_add
(
&
global_key_state_counter
,
1
)
+
1
;
key_state_info
->
time
=
GetTickCount
();
key_state_info
->
counter
=
counter
;
}
/* force refreshing the key state cache - some multithreaded programs
* (like Adobe Photoshop CS5) expect that changes to the async key state
* are also immediately available in other threads. */
if
(
prev_key_state
!=
key_state_info
->
state
[
key
])
counter
=
interlocked_xchg_add
(
&
global_key_state_counter
,
1
)
+
1
;
key_state_info
->
time
=
GetTickCount
();
key_state_info
->
counter
=
counter
;
}
}
SERVER_END_REQ
;
}
SERVER_END_REQ
;
return
ret
;
}
...
...
dlls/user32/user_private.h
View file @
ae7531f6
...
...
@@ -64,7 +64,6 @@ typedef struct tagUSER_DRIVER {
/* keyboard functions */
HKL
(
CDECL
*
pActivateKeyboardLayout
)(
HKL
,
UINT
);
void
(
CDECL
*
pBeep
)(
void
);
SHORT
(
CDECL
*
pGetAsyncKeyState
)(
INT
);
INT
(
CDECL
*
pGetKeyNameText
)(
LONG
,
LPWSTR
,
INT
);
HKL
(
CDECL
*
pGetKeyboardLayout
)(
DWORD
);
UINT
(
CDECL
*
pGetKeyboardLayoutList
)(
INT
,
HKL
*
);
...
...
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