Revision: 14630
http://sourceforge.net/p/edk2/code/14630
Author: ydong10
Date: 2013-09-05 05:39:57 +0000 (Thu, 05 Sep 2013)
Log Message:
-----------
Refine the select language logic.
Signed-off-by: Eric Dong <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Modified Paths:
--------------
trunk/edk2/PerformancePkg/Dp_App/DpUtilities.c
Modified: trunk/edk2/PerformancePkg/Dp_App/DpUtilities.c
===================================================================
--- trunk/edk2/PerformancePkg/Dp_App/DpUtilities.c 2013-09-05 03:02:14 UTC
(rev 14629)
+++ trunk/edk2/PerformancePkg/Dp_App/DpUtilities.c 2013-09-05 05:39:57 UTC
(rev 14630)
@@ -218,8 +218,12 @@
CHAR16 *NameString;
UINTN StringSize;
CHAR8 *PlatformLanguage;
+ CHAR8 *BestLanguage;
EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2;
+ BestLanguage = NULL;
+ PlatformLanguage = NULL;
+
//
// Method 1: Get the name string from image PDB
//
@@ -269,13 +273,23 @@
// Get the current platform language setting
//
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatformLanguage, NULL);
+
+ BestLanguage = GetBestLanguage(
+ ComponentName2->SupportedLanguages,
+ FALSE,
+ PlatformLanguage,
+ ComponentName2->SupportedLanguages,
+ NULL
+ );
+
+ SafeFreePool (PlatformLanguage);
Status = ComponentName2->GetDriverName (
ComponentName2,
- PlatformLanguage != NULL ? PlatformLanguage :
"en-US",
+ BestLanguage,
&StringPtr
);
+ SafeFreePool (BestLanguage);
if (!EFI_ERROR (Status)) {
- SafeFreePool (PlatformLanguage);
StrnCpy (mGaugeString, StringPtr, DP_GAUGE_STRING_LENGTH);
mGaugeString[DP_GAUGE_STRING_LENGTH] = 0;
return;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits