If we do not find a resource for both (primary lang|sub lang), we try
just (primary lang) before using the default.
This commit is contained in:
parent
1e0dfb598b
commit
bb3c164f73
|
@ -14,6 +14,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "wine/winestring.h"
|
#include "wine/winestring.h"
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
|
#include "winnls.h"
|
||||||
#include "pe_image.h"
|
#include "pe_image.h"
|
||||||
#include "module.h"
|
#include "module.h"
|
||||||
#include "heap.h"
|
#include "heap.h"
|
||||||
|
@ -135,6 +136,13 @@ HANDLE PE_FindResourceExW(
|
||||||
if ((resdirptr = GetResDirEntryW(resdirptr, name, root, FALSE)) == NULL)
|
if ((resdirptr = GetResDirEntryW(resdirptr, name, root, FALSE)) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
result = (HANDLE)GetResDirEntryW(resdirptr, (LPCWSTR)(UINT)lang, root, FALSE);
|
result = (HANDLE)GetResDirEntryW(resdirptr, (LPCWSTR)(UINT)lang, root, FALSE);
|
||||||
|
|
||||||
|
/* Try with only the primary language set */
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
lang = MAKELANGID(PRIMARYLANGID(lang), SUBLANG_DEFAULT);
|
||||||
|
result = (HANDLE)GetResDirEntryW(resdirptr, (LPCWSTR)(UINT)lang, root, FALSE);
|
||||||
|
}
|
||||||
/* Try LANG_NEUTRAL, too */
|
/* Try LANG_NEUTRAL, too */
|
||||||
if(!result)
|
if(!result)
|
||||||
return (HANDLE)GetResDirEntryW(resdirptr, (LPCWSTR)0, root, TRUE);
|
return (HANDLE)GetResDirEntryW(resdirptr, (LPCWSTR)0, root, TRUE);
|
||||||
|
|
Loading…
Reference in New Issue