Louis Lenders : kernel32: Improve stub for SetThreadUILanguage.
Alexandre Julliard
julliard at winehq.org
Tue Jun 26 04:44:27 CDT 2018
Module: wine
Branch: stable
Commit: 696ada6bd01d8d88c2679201a146d28a40b08560
URL: https://source.winehq.org/git/wine.git/?a=commit;h=696ada6bd01d8d88c2679201a146d28a40b08560
Author: Louis Lenders <xerox.xerox2000x at gmail.com>
Date: Sat Mar 31 11:26:24 2018 +0200
kernel32: Improve stub for SetThreadUILanguage.
Signed-off-by: Louis Lenders <xerox.xerox2000x at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit e0f9ff9eb003211ce4fa436b7398851f06e46293)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/kernel32/locale.c | 6 +++++-
dlls/kernel32/tests/locale.c | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c
index 7f6c287..b10491a 100644
--- a/dlls/kernel32/locale.c
+++ b/dlls/kernel32/locale.c
@@ -2821,7 +2821,11 @@ BOOL WINAPI SetThreadLocale( LCID lcid )
LANGID WINAPI SetThreadUILanguage( LANGID langid )
{
TRACE("(0x%04x) stub - returning success\n", langid);
- return langid;
+
+ if (!langid)
+ return GetThreadUILanguage();
+ else
+ return langid;
}
/******************************************************************************
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index f3b433e..1f0e8fb 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -5344,7 +5344,7 @@ static void test_SetThreadUILanguage(void)
}
res = pSetThreadUILanguage(0);
- todo_wine ok(res == pGetThreadUILanguage(), "expected %d got %d\n", pGetThreadUILanguage(), res);
+ ok(res == pGetThreadUILanguage(), "expected %d got %d\n", pGetThreadUILanguage(), res);
res = pSetThreadUILanguage(MAKELANGID(LANG_DUTCH, SUBLANG_DUTCH_BELGIAN));
ok(res == MAKELANGID(LANG_DUTCH, SUBLANG_DUTCH_BELGIAN),
More information about the wine-cvs
mailing list