Commit bb3c164f authored by Stephane Lussier's avatar Stephane Lussier Committed by Alexandre Julliard

If we do not find a resource for both (primary lang|sub lang), we try

just (primary lang) before using the default.
parent 1e0dfb59
...@@ -14,6 +14,7 @@ ...@@ -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( ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment