Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd324a2a

Browse files
committed
Merged PR 655: Correct usage of EFI_FONT_INFO
Correct usage of EFI_FONT_INFO. EFI_FONT_INFO structure ends with a string. The definition is only for the first character. The code did not allow for a font name to be specified, nor did it set the first character to a NULL when a font name was not needed.
1 parentb2737ec commitd324a2a

File tree

20 files changed

+428
-170
lines changed

20 files changed

+428
-170
lines changed

‎MsGraphicsPkg/DisplayEngineDxe/FormDisplay.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,7 @@ CreateFormControls (IN FORM_DISPLAY_ENGINE_FORM *FormData,
912912
//
913913
FontInfo.FontStyle=EFI_HII_FONT_STYLE_NORMAL;
914914
FontInfo.FontSize=MsUiGetSmallFontHeight ();// Cell height for small font.
915+
FontInfo.FontName[0]=L'\0';
915916

916917
// Set a starting position within the canvas for rendering UI controls.
917918
//

‎MsGraphicsPkg/Include/UIToolKit/Button.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Copyright (c) 2015 - 2018, Microsoft Corporation.
66
77
All rights reserved.
8-
Redistribution and use in source and binary forms, with or without
8+
Redistribution and use in source and binary forms, with or without
99
modification, are permitted provided that the following conditions are met:
1010
1. Redistributions of source code must retain the above copyright notice,
1111
this list of conditions and the following disclaimer.
@@ -18,10 +18,10 @@
1818
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1919
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
2020
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2222
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
2323
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24-
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2525
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626
2727
**/
@@ -52,7 +52,7 @@ typedef struct _Button
5252

5353
// *** Member variables ***
5454
//
55-
EFI_FONT_INFOm_FontInfo;
55+
EFI_FONT_INFO*m_FontInfo;
5656
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_NormalColor;
5757
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_SelectColor;
5858
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_HoverColor;

‎MsGraphicsPkg/Include/UIToolKit/EditBox.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Copyright (c) 2015 - 2018, Microsoft Corporation.
66
77
All rights reserved.
8-
Redistribution and use in source and binary forms, with or without
8+
Redistribution and use in source and binary forms, with or without
99
modification, are permitted provided that the following conditions are met:
1010
1. Redistributions of source code must retain the above copyright notice,
1111
this list of conditions and the following disclaimer.
@@ -18,10 +18,10 @@
1818
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1919
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
2020
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2222
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
2323
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24-
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2525
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626
2727
**/
@@ -67,7 +67,7 @@ typedef struct _EditBox
6767
EFI_EVENTm_HidePasswordEvent;
6868
BOOLEANm_KeyboardEnabled;
6969

70-
EFI_FONT_INFOm_FontInfo;
70+
EFI_FONT_INFO*m_FontInfo;
7171
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_NormalColor;
7272
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_NormalTextColor;
7373
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_GrayOutColor;

‎MsGraphicsPkg/Include/UIToolKit/Label.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Copyright (c) 2015 - 2018, Microsoft Corporation.
66
77
All rights reserved.
8-
Redistribution and use in source and binary forms, with or without
8+
Redistribution and use in source and binary forms, with or without
99
modification, are permitted provided that the following conditions are met:
1010
1. Redistributions of source code must retain the above copyright notice,
1111
this list of conditions and the following disclaimer.
@@ -18,10 +18,10 @@
1818
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1919
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
2020
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2222
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
2323
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24-
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2525
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626
2727
**/
@@ -49,7 +49,7 @@ typedef struct _Label
4949

5050
// *** Member variables ***
5151
//
52-
EFI_FONT_INFOm_FontInfo;
52+
EFI_FONT_INFO*m_FontInfo;
5353
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_TextColor;
5454
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_BackgroundColor;
5555

‎MsGraphicsPkg/Include/UIToolKit/ListBox.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Copyright (c) 2015 - 2018, Microsoft Corporation.
66
77
All rights reserved.
8-
Redistribution and use in source and binary forms, with or without
8+
Redistribution and use in source and binary forms, with or without
99
modification, are permitted provided that the following conditions are met:
1010
1. Redistributions of source code must retain the above copyright notice,
1111
this list of conditions and the following disclaimer.
@@ -18,10 +18,10 @@
1818
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1919
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
2020
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2222
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
2323
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24-
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2525
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626
2727
**/
@@ -113,7 +113,7 @@ typedef struct _ListBox
113113

114114
// *** Member variables ***
115115
//
116-
EFI_FONT_INFOm_FontInfo;
116+
EFI_FONT_INFO*m_FontInfo;
117117
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_NormalColor;
118118
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_HoverColor;
119119
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_SelectColor;
@@ -177,7 +177,7 @@ ListBox *new_ListBox(IN UINT32 OrigX,
177177
INUINT32CellTextXOffset,
178178
INEFI_GRAPHICS_OUTPUT_BLT_PIXEL*NormalColor,
179179
INEFI_GRAPHICS_OUTPUT_BLT_PIXEL*HoverColor,
180-
INEFI_GRAPHICS_OUTPUT_BLT_PIXEL*SelectColor,
180+
INEFI_GRAPHICS_OUTPUT_BLT_PIXEL*SelectColor,
181181
INEFI_GRAPHICS_OUTPUT_BLT_PIXEL*GrayOutColor,
182182
INUIT_LB_CELLDATA*CellData,
183183
INVOID*pSelectionContext);

‎MsGraphicsPkg/Include/UIToolKit/ToggleSwitch.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Copyright (c) 2015 - 2018, Microsoft Corporation.
66
77
All rights reserved.
8-
Redistribution and use in source and binary forms, with or without
8+
Redistribution and use in source and binary forms, with or without
99
modification, are permitted provided that the following conditions are met:
1010
1. Redistributions of source code must retain the above copyright notice,
1111
this list of conditions and the following disclaimer.
@@ -18,10 +18,10 @@
1818
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1919
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
2020
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2222
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
2323
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24-
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2525
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626
2727
**/
@@ -60,7 +60,7 @@ typedef struct _ToggleSwitch
6060

6161
// *** Member variables ***
6262
//
63-
EFI_FONT_INFOm_FontInfo;
63+
EFI_FONT_INFO*m_FontInfo;
6464
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_OnColor;
6565
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_OffColor;
6666
EFI_GRAPHICS_OUTPUT_BLT_PIXELm_HoverColor;
@@ -72,7 +72,7 @@ typedef struct _ToggleSwitch
7272

7373
// *** Functions ***
7474
//
75-
VOID
75+
VOID
7676
(*Ctor)(INstruct_ToggleSwitch*this,
7777
INSWM_RECTToggleSwitchBox,
7878
INEFI_FONT_INFO*FontInfo,

‎MsGraphicsPkg/Include/UIToolKit/Utilities.h‎

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Copyright (c) 2015 - 2018, Microsoft Corporation.
66
77
All rights reserved.
8-
Redistribution and use in source and binary forms, with or without
8+
Redistribution and use in source and binary forms, with or without
99
modification, are permitted provided that the following conditions are met:
1010
1. Redistributions of source code must retain the above copyright notice,
1111
this list of conditions and the following disclaimer.
@@ -18,10 +18,10 @@
1818
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1919
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
2020
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2222
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
2323
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24-
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2525
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626
2727
**/
@@ -32,6 +32,7 @@
3232
// Preprocessor constants.
3333
//
3434
#defineUIT_INVALID_SELECTION (UINT32)-1
35+
#defineMAX_FONT_NAME_SIZE 256
3536

3637

3738
/**
@@ -47,6 +48,7 @@ Calculates the bitmap width and height of the specified text string based on the
4748
4849
**/
4950
EFI_STATUS
51+
EFIAPI
5052
GetTextStringBitmapSize (INCHAR16*pString,
5153
INEFI_FONT_INFO*FontInfo,
5254
INBOOLEANBoundsLimit,
@@ -58,6 +60,7 @@ GetTextStringBitmapSize (IN CHAR16 *pString,
5860
// Given two canvas, find the "control" that is "InThisList" that is the eqivalent control
5961
// "InOtherList"
6062
UIT_CANVAS_CHILD_CONTROL*
63+
EFIAPI
6164
GetEquivalentControl (INUIT_CANVAS_CHILD_CONTROL*Control,
6265
INCanvas*InThisList,
6366
INCanvas*InOtherList);
@@ -78,6 +81,7 @@ GetEquivalentControl (IN UIT_CANVAS_CHILD_CONTROL *Control,
7881
**/
7982

8083
EFI_STATUS
84+
EFIAPI
8185
DrawRectangleOutline (INUINT32OrigX,
8286
INUINT32OrigY,
8387
INUINT32Width,
@@ -86,4 +90,31 @@ DrawRectangleOutline (IN UINT32 OrigX,
8690
INEFI_GRAPHICS_OUTPUT_BLT_PIXEL*Color);
8791

8892

93+
/**
94+
Returns a copy of the FONT_INFO structure.
95+
96+
@param[in] FontInfo Pointer to callers FONT_INFO.
97+
98+
@retval NewFontInfo Copy of FONT_INFO. Caller must free.
99+
100+
**/
101+
102+
EFI_FONT_INFO*
103+
EFIAPI
104+
DupFontInfo (INEFI_FONT_INFO*FontInfo);
105+
106+
/**
107+
Returns a new FontDisplayInfo populated with callers FontInfo.
108+
109+
@param[in] FontInfo Pointer to callers FONT_INFO.
110+
111+
@retval NewFontDisplayInfo New FontDisplayIfo with font from FontInfo
112+
Caller must free.
113+
114+
**/
115+
116+
EFI_FONT_DISPLAY_INFO*
117+
EFIAPI
118+
BuildFontDisplayInfoFromFontInfo (INEFI_FONT_INFO*FontInfo);
119+
89120
#endif// _UIT_UTILITIES_H_.

‎MsGraphicsPkg/Library/SimpleUIToolKit/Button.c‎

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Copyright (c) 2015 - 2018, Microsoft Corporation.
66
77
All rights reserved.
8-
Redistribution and use in source and binary forms, with or without
8+
Redistribution and use in source and binary forms, with or without
99
modification, are permitted provided that the following conditions are met:
1010
1. Redistributions of source code must retain the above copyright notice,
1111
this list of conditions and the following disclaimer.
@@ -18,10 +18,10 @@
1818
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1919
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
2020
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2222
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
2323
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24-
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2525
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626
2727
**/
@@ -44,8 +44,8 @@ RenderButton(IN Button *this,
4444
{
4545
EFI_STATUSStatus=EFI_SUCCESS;
4646
UINTNWidth,Height;
47-
EFI_FONT_DISPLAY_INFOStringInfo;
48-
EFI_IMAGE_OUTPUT*pBltBuffer;
47+
EFI_FONT_DISPLAY_INFO*StringInfo=NULL;
48+
EFI_IMAGE_OUTPUT*pBltBuffer=NULL;
4949
EFI_GRAPHICS_OUTPUT_BLT_PIXEL*pTextColor;
5050
EFI_GRAPHICS_OUTPUT_BLT_PIXEL*pFillColor;
5151

@@ -77,9 +77,16 @@ RenderButton(IN Button *this,
7777
pTextColor=&this->m_NormalTextColor;
7878
break;
7979
}
80-
CopyMem (&StringInfo.BackgroundColor,pFillColor,sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
81-
CopyMem (&StringInfo.ForegroundColor,pTextColor,sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
8280

81+
StringInfo=BuildFontDisplayInfoFromFontInfo (this->m_FontInfo);
82+
if (NULL==StringInfo)
83+
{
84+
Status=EFI_OUT_OF_RESOURCES;
85+
gotoExit;
86+
}
87+
88+
CopyMem (&StringInfo->BackgroundColor,pFillColor,sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
89+
CopyMem (&StringInfo->ForegroundColor,pTextColor,sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
8390

8491
// Prepare string blitting buffer.
8592
//
@@ -150,16 +157,15 @@ RenderButton(IN Button *this,
150157
//
151158
// Select preferred font size and style for the button (smaller, normal font).
152159
//
153-
StringInfo.FontInfoMask=EFI_FONT_INFO_ANY_FONT;
154-
CopyMem (&StringInfo.FontInfo,&this->m_FontInfo,sizeof (EFI_FONT_INFO));
160+
StringInfo->FontInfoMask=EFI_FONT_INFO_ANY_FONT;
155161

156162
mUITSWM->StringToWindow (mUITSWM,
157163
mClientImageHandle,
158164
EFI_HII_OUT_FLAG_CLIP |
159165
EFI_HII_OUT_FLAG_CLIP_CLEAN_X |EFI_HII_OUT_FLAG_CLIP_CLEAN_Y |
160166
EFI_HII_IGNORE_LINE_BREAK |EFI_HII_DIRECT_TO_SCREEN,
161167
this->m_pButton->pButtonText,
162-
&StringInfo,
168+
StringInfo,
163169
&pBltBuffer,
164170
this->m_pButton->ButtonTextBounds.Left,
165171
this->m_pButton->ButtonTextBounds.Top,
@@ -170,6 +176,11 @@ RenderButton(IN Button *this,
170176

171177
Exit:
172178

179+
if (NULL!=StringInfo)
180+
{
181+
FreePool (StringInfo);
182+
}
183+
173184
if (NULL!=pBltBuffer)
174185
{
175186
FreePool(pBltBuffer);
@@ -386,7 +397,11 @@ Ctor(IN struct _Button *this,
386397

387398
// Initialize variables.
388399
//
389-
CopyMem(&this->m_FontInfo,FontInfo,sizeof(EFI_FONT_INFO));
400+
this->m_FontInfo=DupFontInfo (FontInfo);
401+
if (NULL==this->m_FontInfo)
402+
{
403+
gotoExit;
404+
}
390405

391406
this->m_NormalColor=*pNormalColor;
392407
this->m_HoverColor=*pHoverColor;
@@ -478,11 +493,17 @@ VOID Dtor(VOID *this)
478493
{
479494
FreePool(privthis->m_pButton->pButtonText);
480495
}
496+
481497
if (NULL!=privthis->m_pButton)
482498
{
483499
FreePool(privthis->m_pButton);
484500
}
485501

502+
if (NULL!=privthis->m_FontInfo)
503+
{
504+
FreePool(privthis->m_FontInfo);
505+
}
506+
486507
if (NULL!=privthis)
487508
{
488509
FreePool(privthis);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp