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
8ec1206b
Commit
8ec1206b
authored
May 06, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
May 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Read "Layout Id" from registry in GetKeyboardLayoutNameW.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c4e6d162
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
input.c
dlls/user32/input.c
+22
-1
No files found.
dlls/user32/input.c
View file @
8ec1206b
...
@@ -1110,7 +1110,9 @@ BOOL WINAPI GetKeyboardLayoutNameA(LPSTR pszKLID)
...
@@ -1110,7 +1110,9 @@ BOOL WINAPI GetKeyboardLayoutNameA(LPSTR pszKLID)
*/
*/
BOOL
WINAPI
GetKeyboardLayoutNameW
(
WCHAR
*
name
)
BOOL
WINAPI
GetKeyboardLayoutNameW
(
WCHAR
*
name
)
{
{
DWORD
tmp
;
WCHAR
klid
[
KL_NAMELENGTH
],
value
[
5
];
DWORD
value_size
,
tmp
,
i
=
0
;
HKEY
hkey
;
HKL
layout
;
HKL
layout
;
TRACE_
(
keyboard
)(
"name %p
\n
"
,
name
);
TRACE_
(
keyboard
)(
"name %p
\n
"
,
name
);
...
@@ -1126,6 +1128,25 @@ BOOL WINAPI GetKeyboardLayoutNameW( WCHAR *name )
...
@@ -1126,6 +1128,25 @@ BOOL WINAPI GetKeyboardLayoutNameW( WCHAR *name )
if
(
HIWORD
(
tmp
)
==
LOWORD
(
tmp
))
tmp
=
LOWORD
(
tmp
);
if
(
HIWORD
(
tmp
)
==
LOWORD
(
tmp
))
tmp
=
LOWORD
(
tmp
);
swprintf
(
name
,
KL_NAMELENGTH
,
L"%08X"
,
tmp
);
swprintf
(
name
,
KL_NAMELENGTH
,
L"%08X"
,
tmp
);
if
(
!
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
L"System
\\
CurrentControlSet
\\
Control
\\
Keyboard Layouts"
,
&
hkey
))
{
while
(
!
RegEnumKeyW
(
hkey
,
i
++
,
klid
,
ARRAY_SIZE
(
klid
)
))
{
value_size
=
sizeof
(
value
);
if
(
!
RegGetValueW
(
hkey
,
klid
,
L"Layout Id"
,
RRF_RT_REG_SZ
,
NULL
,
(
void
*
)
&
value
,
&
value_size
))
tmp
=
0xf000
|
(
wcstoul
(
value
,
NULL
,
16
)
&
0xfff
);
else
tmp
=
wcstoul
(
klid
,
NULL
,
16
);
if
(
HIWORD
(
layout
)
==
tmp
)
{
lstrcpynW
(
name
,
klid
,
KL_NAMELENGTH
);
break
;
}
}
RegCloseKey
(
hkey
);
}
TRACE_
(
keyboard
)(
"ret %s
\n
"
,
debugstr_w
(
name
)
);
TRACE_
(
keyboard
)(
"ret %s
\n
"
,
debugstr_w
(
name
)
);
return
TRUE
;
return
TRUE
;
}
}
...
...
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