ntdll: Fetch locale information from the Unix side in resource loading.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50769 Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
40e1000fc5
commit
46fd718ec7
|
@ -100,8 +100,6 @@ struct norm_table
|
|||
/* WORD[] composition character sequences */
|
||||
};
|
||||
|
||||
LCID user_lcid = 0, system_lcid = 0;
|
||||
|
||||
static NLSTABLEINFO nls_info;
|
||||
static HMODULE kernel32_handle;
|
||||
static struct norm_table *norm_tables[16];
|
||||
|
|
|
@ -85,9 +85,6 @@ extern const struct unix_funcs *unix_funcs DECLSPEC_HIDDEN;
|
|||
|
||||
extern struct _KUSER_SHARED_DATA *user_shared_data DECLSPEC_HIDDEN;
|
||||
|
||||
/* locale */
|
||||
extern LCID user_lcid, system_lcid;
|
||||
|
||||
extern int CDECL NTDLL__vsnprintf( char *str, SIZE_T len, const char *format, __ms_va_list args ) DECLSPEC_HIDDEN;
|
||||
extern int CDECL NTDLL__vsnwprintf( WCHAR *str, SIZE_T len, const WCHAR *format, __ms_va_list args ) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
|
@ -175,6 +175,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_name( const IMAGE_RESOURCE_
|
|||
static NTSTATUS find_entry( HMODULE hmod, const LDR_RESOURCE_INFO *info,
|
||||
ULONG level, const void **ret, int want_dir )
|
||||
{
|
||||
static LCID user_lcid, system_lcid;
|
||||
ULONG size;
|
||||
const void *root;
|
||||
const IMAGE_RESOURCE_DIRECTORY *resdirptr;
|
||||
|
@ -212,6 +213,8 @@ static NTSTATUS find_entry( HMODULE hmod, const LDR_RESOURCE_INFO *info,
|
|||
/* user defaults, unless SYS_DEFAULT sublanguage specified */
|
||||
if (SUBLANGID(info->Language) != SUBLANG_SYS_DEFAULT)
|
||||
{
|
||||
if (!user_lcid) NtQueryDefaultLocale( TRUE, &user_lcid );
|
||||
|
||||
/* 4. current thread locale language */
|
||||
pos = push_language( list, pos, LANGIDFROMLCID(NtCurrentTeb()->CurrentLocale) );
|
||||
|
||||
|
@ -223,6 +226,7 @@ static NTSTATUS find_entry( HMODULE hmod, const LDR_RESOURCE_INFO *info,
|
|||
}
|
||||
|
||||
/* now system defaults */
|
||||
if (!system_lcid) NtQueryDefaultLocale( FALSE, &system_lcid );
|
||||
|
||||
/* 7. system locale language */
|
||||
pos = push_language( list, pos, LANGIDFROMLCID( system_lcid ) );
|
||||
|
|
Loading…
Reference in New Issue