Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2a7cdcf3
Commit
2a7cdcf3
authored
Jan 03, 2014
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version: Load the resource that corresponds to the current language first.
parent
190878d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
1 deletion
+41
-1
version.c
dlls/version/version.c
+41
-1
No files found.
dlls/version/version.c
View file @
2a7cdcf3
...
...
@@ -109,6 +109,46 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_default( const IMAGE_RESOURCE_
}
/**********************************************************************
* push_language
*
* push a language in the list of languages to try
*/
static
inline
int
push_language
(
WORD
*
list
,
int
pos
,
WORD
lang
)
{
int
i
;
for
(
i
=
0
;
i
<
pos
;
i
++
)
if
(
list
[
i
]
==
lang
)
return
pos
;
list
[
pos
++
]
=
lang
;
return
pos
;
}
/**********************************************************************
* find_entry_language
*/
static
const
IMAGE_RESOURCE_DIRECTORY
*
find_entry_language
(
const
IMAGE_RESOURCE_DIRECTORY
*
dir
,
const
void
*
root
)
{
const
IMAGE_RESOURCE_DIRECTORY
*
ret
;
WORD
list
[
9
];
int
i
,
pos
=
0
;
/* cf. LdrFindResource_U */
pos
=
push_language
(
list
,
pos
,
MAKELANGID
(
LANG_NEUTRAL
,
SUBLANG_NEUTRAL
)
);
pos
=
push_language
(
list
,
pos
,
LANGIDFROMLCID
(
NtCurrentTeb
()
->
CurrentLocale
)
);
pos
=
push_language
(
list
,
pos
,
GetUserDefaultLangID
()
);
pos
=
push_language
(
list
,
pos
,
MAKELANGID
(
PRIMARYLANGID
(
GetUserDefaultLangID
()),
SUBLANG_NEUTRAL
));
pos
=
push_language
(
list
,
pos
,
MAKELANGID
(
PRIMARYLANGID
(
GetUserDefaultLangID
()),
SUBLANG_DEFAULT
));
pos
=
push_language
(
list
,
pos
,
GetSystemDefaultLangID
()
);
pos
=
push_language
(
list
,
pos
,
MAKELANGID
(
PRIMARYLANGID
(
GetSystemDefaultLangID
()),
SUBLANG_NEUTRAL
));
pos
=
push_language
(
list
,
pos
,
MAKELANGID
(
PRIMARYLANGID
(
GetSystemDefaultLangID
()),
SUBLANG_DEFAULT
));
pos
=
push_language
(
list
,
pos
,
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_DEFAULT
)
);
for
(
i
=
0
;
i
<
pos
;
i
++
)
if
((
ret
=
find_entry_by_id
(
dir
,
list
[
i
],
root
)))
return
ret
;
return
find_entry_default
(
dir
,
root
);
}
/***********************************************************************
* read_xx_header [internal]
*/
...
...
@@ -316,7 +356,7 @@ static BOOL find_pe_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff )
TRACE
(
"No resid entry found
\n
"
);
goto
done
;
}
resPtr
=
find_entry_
default
(
resPtr
,
resDir
);
resPtr
=
find_entry_
language
(
resPtr
,
resDir
);
if
(
!
resPtr
)
{
TRACE
(
"No default language entry found
\n
"
);
...
...
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