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
6e815d77
Commit
6e815d77
authored
Dec 18, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Dec 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Dynamically resize the keyboard layout preload list.
parent
1cef923e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
input.c
dlls/user32/tests/input.c
+7
-5
No files found.
dlls/user32/tests/input.c
View file @
6e815d77
...
...
@@ -3379,7 +3379,7 @@ static void test_keyboard_layout_name(void)
len
=
GetKeyboardLayoutList
(
len
,
layouts
);
ok
(
len
>
0
,
"GetKeyboardLayoutList returned %d
\n
"
,
len
);
layouts_preload
=
calloc
(
len
,
sizeof
(
HKL
));
layouts_preload
=
calloc
(
1
,
sizeof
(
HKL
));
ok
(
layouts_preload
!=
NULL
,
"Could not allocate memory
\n
"
);
if
(
!
RegOpenKeyW
(
HKEY_CURRENT_USER
,
L"Keyboard Layout
\\
Preload"
,
&
hkey
))
...
...
@@ -3388,24 +3388,26 @@ static void test_keyboard_layout_name(void)
type
=
REG_SZ
;
klid_size
=
sizeof
(
klid
);
value_size
=
ARRAY_SIZE
(
value
);
while
(
i
<
len
&&
!
RegEnumValueW
(
hkey
,
i
++
,
value
,
&
value_size
,
NULL
,
&
type
,
(
void
*
)
&
klid
,
&
klid_size
))
while
(
!
RegEnumValueW
(
hkey
,
i
++
,
value
,
&
value_size
,
NULL
,
&
type
,
(
void
*
)
&
klid
,
&
klid_size
))
{
klid_size
=
sizeof
(
klid
);
value_size
=
ARRAY_SIZE
(
value
);
layouts_preload
=
realloc
(
layouts_preload
,
(
i
+
1
)
*
sizeof
(
*
layouts_preload
)
);
ok
(
layouts_preload
!=
NULL
,
"Could not allocate memory
\n
"
);
layouts_preload
[
i
-
1
]
=
UlongToHandle
(
wcstoul
(
klid
,
NULL
,
16
)
);
layouts_preload
[
i
]
=
0
;
id
=
(
DWORD_PTR
)
layouts_preload
[
i
-
1
];
if
(
id
&
0x80000000
)
todo_wine_if
(
HIWORD
(
id
)
==
0xe001
)
ok
((
id
&
0xf0000000
)
==
0xd0000000
,
"Unexpected preloaded keyboard layout high bits %#lx
\n
"
,
id
);
else
ok
(
!
(
id
&
0xf0000000
),
"Unexpected preloaded keyboard layout high bits %#lx
\n
"
,
id
);
}
ok
(
i
<=
len
,
"Unexpected keyboard count %d in preload list
\n
"
,
i
);
RegCloseKey
(
hkey
);
}
if
(
!
RegOpenKeyW
(
HKEY_CURRENT_USER
,
L"Keyboard Layout
\\
Substitutes"
,
&
hkey
))
{
for
(
i
=
0
;
i
<
len
&&
layouts_preload
[
i
];
++
i
)
for
(
i
=
0
;
layouts_preload
[
i
];
++
i
)
{
type
=
REG_SZ
;
klid_size
=
sizeof
(
klid
);
...
...
@@ -3447,7 +3449,7 @@ static void test_keyboard_layout_name(void)
GetKeyboardLayoutNameW
(
klid
);
for
(
j
=
0
;
j
<
len
;
++
j
)
for
(
j
=
0
;
layouts_preload
[
j
]
;
++
j
)
{
swprintf
(
tmpklid
,
KL_NAMELENGTH
,
L"%08X"
,
layouts_preload
[
j
]
);
if
(
!
wcscmp
(
tmpklid
,
klid
))
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