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
c908c9c7
Commit
c908c9c7
authored
Jun 25, 2015
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Jun 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetest: Add SystemPreferredUILanguages to the log.
A few GDI functions are affected by System account's display language (by GetSystemPreferredUILanguages).
parent
c0f5d024
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
main.c
programs/winetest/main.c
+20
-5
No files found.
programs/winetest/main.c
View file @
c908c9c7
...
...
@@ -445,20 +445,35 @@ static void print_version (void)
static
void
print_language
(
void
)
{
HMODULE
hkernel32
;
BOOL
(
WINAPI
*
pGetSystemPreferredUILanguages
)(
DWORD
,
PULONG
,
PZZWSTR
,
PULONG
);
LANGID
(
WINAPI
*
pGetUserDefaultUILanguage
)(
void
);
LANGID
(
WINAPI
*
pGetThreadUILanguage
)(
void
);
xprintf
(
" SystemDefaultLCID=%x
\n
"
,
GetSystemDefaultLCID
());
xprintf
(
" UserDefaultLCID=%x
\n
"
,
GetUserDefaultLCID
());
xprintf
(
" ThreadLocale=%x
\n
"
,
GetThreadLocale
());
xprintf
(
" SystemDefaultLCID=%
04
x
\n
"
,
GetSystemDefaultLCID
());
xprintf
(
" UserDefaultLCID=%
04
x
\n
"
,
GetUserDefaultLCID
());
xprintf
(
" ThreadLocale=%
04
x
\n
"
,
GetThreadLocale
());
hkernel32
=
GetModuleHandleA
(
"kernel32.dll"
);
pGetSystemPreferredUILanguages
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetSystemPreferredUILanguages"
);
pGetUserDefaultUILanguage
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetUserDefaultUILanguage"
);
pGetThreadUILanguage
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetThreadUILanguage"
);
if
(
pGetSystemPreferredUILanguages
&&
!
running_under_wine
())
{
WCHAR
langW
[
32
];
ULONG
num
,
size
=
sizeof
(
langW
)
/
sizeof
(
langW
[
0
]);
if
(
pGetSystemPreferredUILanguages
(
MUI_LANGUAGE_ID
,
&
num
,
langW
,
&
size
))
{
char
lang
[
32
],
*
p
=
lang
;
WideCharToMultiByte
(
CP_ACP
,
0
,
langW
,
size
,
lang
,
sizeof
(
lang
),
NULL
,
NULL
);
for
(
p
+=
strlen
(
p
)
+
1
;
*
p
!=
'\0'
;
p
+=
strlen
(
p
)
+
1
)
*
(
p
-
1
)
=
','
;
xprintf
(
" SystemPreferredUILanguages=%s
\n
"
,
lang
);
}
}
if
(
pGetUserDefaultUILanguage
)
xprintf
(
" UserDefaultUILanguage=%x
\n
"
,
pGetUserDefaultUILanguage
());
xprintf
(
" UserDefaultUILanguage=%
04
x
\n
"
,
pGetUserDefaultUILanguage
());
if
(
pGetThreadUILanguage
)
xprintf
(
" ThreadUILanguage=%x
\n
"
,
pGetThreadUILanguage
());
xprintf
(
" ThreadUILanguage=%
04
x
\n
"
,
pGetThreadUILanguage
());
}
static
inline
BOOL
is_dot_dir
(
const
char
*
x
)
...
...
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