mirror of https://github.com/acidanthera/audk.git
MdeModulePkg: Change BootLogoEnableLogo use INTN for minus value
The parameter name is also changed from Coordinate* to Offset* to reflect that it's the offset to the location specified by Attribute. For example, when the Attribute is Center, OffsetX and OffsetY are used to specify the offset to the Center. OffsetX = 100 means 100 pixels right to the Center. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18867 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
c25be72e15
commit
b9335cf562
|
@ -24,8 +24,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
@param[in] ImageFormat Format of the image file.
|
@param[in] ImageFormat Format of the image file.
|
||||||
@param[in] LogoFile The file name of logo to display.
|
@param[in] LogoFile The file name of logo to display.
|
||||||
@param[in] Attribute The display attributes of the image returned.
|
@param[in] Attribute The display attributes of the image returned.
|
||||||
@param[in] CoordinateX The X coordinate of the image.
|
@param[in] OffsetX The X offset of the image regarding the Attribute.
|
||||||
@param[in] CoordinateY The Y coordinate of the image.
|
@param[in] OffsetY The Y offset of the image regarding the Attribute.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Logo was displayed.
|
@retval EFI_SUCCESS Logo was displayed.
|
||||||
@retval EFI_UNSUPPORTED Logo was not found or cannot be displayed.
|
@retval EFI_UNSUPPORTED Logo was not found or cannot be displayed.
|
||||||
|
@ -36,8 +36,8 @@ BootLogoEnableLogo (
|
||||||
IN IMAGE_FORMAT ImageFormat,
|
IN IMAGE_FORMAT ImageFormat,
|
||||||
IN EFI_GUID *Logo,
|
IN EFI_GUID *Logo,
|
||||||
IN EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE Attribute,
|
IN EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE Attribute,
|
||||||
IN UINTN CoordinateX,
|
IN INTN OffsetX,
|
||||||
IN UINTN CoordinateY
|
IN INTN OffsetY
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
@param[in] ImageFormat Format of the image file.
|
@param[in] ImageFormat Format of the image file.
|
||||||
@param[in] LogoFile The file name of logo to display.
|
@param[in] LogoFile The file name of logo to display.
|
||||||
@param[in] Attribute The display attributes of the image returned.
|
@param[in] Attribute The display attributes of the image returned.
|
||||||
@param[in] CoordinateX The X coordinate of the image.
|
@param[in] OffsetX The X offset of the image regarding the Attribute.
|
||||||
@param[in] CoordinateY The Y coordinate of the image.
|
@param[in] OffsetY The Y offset of the image regarding the Attribute.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Logo was displayed.
|
@retval EFI_SUCCESS Logo was displayed.
|
||||||
@retval EFI_UNSUPPORTED Logo was not found or cannot be displayed.
|
@retval EFI_UNSUPPORTED Logo was not found or cannot be displayed.
|
||||||
|
@ -47,8 +47,8 @@ BootLogoEnableLogo (
|
||||||
IN IMAGE_FORMAT ImageFormat,
|
IN IMAGE_FORMAT ImageFormat,
|
||||||
IN EFI_GUID *Logo,
|
IN EFI_GUID *Logo,
|
||||||
IN EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE Attribute,
|
IN EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE Attribute,
|
||||||
IN UINTN CoordinateX,
|
IN INTN OffsetX,
|
||||||
IN UINTN CoordinateY
|
IN INTN OffsetY
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -160,8 +160,8 @@ BootLogoEnableLogo (
|
||||||
&ImageData,
|
&ImageData,
|
||||||
&ImageSize,
|
&ImageSize,
|
||||||
&Attribute,
|
&Attribute,
|
||||||
&CoordinateX,
|
&OffsetX,
|
||||||
&CoordinateY
|
&OffsetY
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
break;
|
break;
|
||||||
|
@ -199,55 +199,52 @@ BootLogoEnableLogo (
|
||||||
//
|
//
|
||||||
switch (Attribute) {
|
switch (Attribute) {
|
||||||
case EdkiiPlatformLogoDisplayAttributeLeftTop:
|
case EdkiiPlatformLogoDisplayAttributeLeftTop:
|
||||||
DestX = CoordinateX;
|
DestX = 0;
|
||||||
DestY = CoordinateY;
|
DestY = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EdkiiPlatformLogoDisplayAttributeCenterTop:
|
case EdkiiPlatformLogoDisplayAttributeCenterTop:
|
||||||
DestX = (SizeOfX - Width) / 2;
|
DestX = (SizeOfX - Width) / 2;
|
||||||
DestY = CoordinateY;
|
DestY = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EdkiiPlatformLogoDisplayAttributeRightTop:
|
case EdkiiPlatformLogoDisplayAttributeRightTop:
|
||||||
DestX = (SizeOfX - Width - CoordinateX);
|
DestX = SizeOfX - Width;
|
||||||
DestY = CoordinateY;;
|
DestY = 0;
|
||||||
break;
|
|
||||||
|
|
||||||
case EdkiiPlatformLogoDisplayAttributeCenterRight:
|
|
||||||
DestX = (SizeOfX - Width - CoordinateX);
|
|
||||||
DestY = (SizeOfY - Height) / 2;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case EdkiiPlatformLogoDisplayAttributeRightBottom:
|
|
||||||
DestX = (SizeOfX - Width - CoordinateX);
|
|
||||||
DestY = (SizeOfY - Height - CoordinateY);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case EdkiiPlatformLogoDisplayAttributeCenterBottom:
|
|
||||||
DestX = (SizeOfX - Width) / 2;
|
|
||||||
DestY = (SizeOfY - Height - CoordinateY);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case EdkiiPlatformLogoDisplayAttributeLeftBottom:
|
|
||||||
DestX = CoordinateX;
|
|
||||||
DestY = (SizeOfY - Height - CoordinateY);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EdkiiPlatformLogoDisplayAttributeCenterLeft:
|
case EdkiiPlatformLogoDisplayAttributeCenterLeft:
|
||||||
DestX = CoordinateX;
|
DestX = 0;
|
||||||
DestY = (SizeOfY - Height) / 2;
|
DestY = (SizeOfY - Height) / 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EdkiiPlatformLogoDisplayAttributeCenter:
|
case EdkiiPlatformLogoDisplayAttributeCenter:
|
||||||
DestX = (SizeOfX - Width) / 2;
|
DestX = (SizeOfX - Width) / 2;
|
||||||
DestY = (SizeOfY - Height) / 2;
|
DestY = (SizeOfY - Height) / 2;
|
||||||
break;
|
break;
|
||||||
|
case EdkiiPlatformLogoDisplayAttributeCenterRight:
|
||||||
|
DestX = SizeOfX - Width;
|
||||||
|
DestY = (SizeOfY - Height) / 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case EdkiiPlatformLogoDisplayAttributeLeftBottom:
|
||||||
|
DestX = 0;
|
||||||
|
DestY = SizeOfY - Height;
|
||||||
|
break;
|
||||||
|
case EdkiiPlatformLogoDisplayAttributeCenterBottom:
|
||||||
|
DestX = (SizeOfX - Width) / 2;
|
||||||
|
DestY = SizeOfY - Height;
|
||||||
|
break;
|
||||||
|
case EdkiiPlatformLogoDisplayAttributeRightBottom:
|
||||||
|
DestX = SizeOfX - Width;
|
||||||
|
DestY = SizeOfY - Height;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DestX += OffsetX;
|
||||||
|
DestY += OffsetY;
|
||||||
|
|
||||||
if ((DestX >= 0) && (DestY >= 0)) {
|
if ((DestX >= 0) && (DestY >= 0)) {
|
||||||
if (GraphicsOutput != NULL) {
|
if (GraphicsOutput != NULL) {
|
||||||
Status = GraphicsOutput->Blt (
|
Status = GraphicsOutput->Blt (
|
||||||
|
|
Loading…
Reference in New Issue