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
c0ff1a22
Commit
c0ff1a22
authored
Apr 01, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Set system/user locales by name if they have no LCID.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4a757e2d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
locale.c
dlls/kernelbase/locale.c
+23
-3
No files found.
dlls/kernelbase/locale.c
View file @
c0ff1a22
...
...
@@ -1547,12 +1547,32 @@ void init_locale( HMODULE module )
SIZE_T
size
;
HKEY
hkey
;
kernelbase_handle
=
module
;
load_locale_nls
();
NtQueryDefaultLocale
(
FALSE
,
&
system_lcid
);
NtQueryDefaultLocale
(
FALSE
,
&
user_lcid
);
system_locale
=
get_locale_by_id
(
&
system_lcid
,
0
);
user_locale
=
get_locale_by_id
(
&
user_lcid
,
0
);
kernelbase_handle
=
module
;
if
(
!
(
system_locale
=
get_locale_by_id
(
&
system_lcid
,
0
)))
{
if
(
GetEnvironmentVariableW
(
L"WINELOCALE"
,
bufferW
,
ARRAY_SIZE
(
bufferW
)
))
{
system_locale
=
get_locale_by_name
(
bufferW
,
&
system_lcid
);
if
(
system_lcid
==
LOCALE_CUSTOM_UNSPECIFIED
)
system_lcid
=
LOCALE_CUSTOM_DEFAULT
;
}
}
if
(
!
(
user_locale
=
get_locale_by_id
(
&
user_lcid
,
0
)))
{
if
(
GetEnvironmentVariableW
(
L"WINEUSERLOCALE"
,
bufferW
,
ARRAY_SIZE
(
bufferW
)
))
{
user_locale
=
get_locale_by_name
(
bufferW
,
&
user_lcid
);
if
(
user_lcid
==
LOCALE_CUSTOM_UNSPECIFIED
)
user_lcid
=
LOCALE_CUSTOM_DEFAULT
;
}
else
{
user_locale
=
system_locale
;
user_lcid
=
system_lcid
;
}
}
if
(
GetEnvironmentVariableW
(
L"WINEUNIXCP"
,
bufferW
,
ARRAY_SIZE
(
bufferW
)
))
unix_cp
=
wcstoul
(
bufferW
,
NULL
,
10
);
...
...
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