QCM6125 UEFI XBL显示开机Logo在竖直方向不是居中显示,如果显示屏是正向安装到产品的话可能没有什么问题,但是如果产品的显示屏是90、180、270度旋转后安装到产品上的话显示开机Logo会有一些问题,并且大多数的平台以及产品开机Logo都是水平竖直方向都是居中显示,所以修改成居中显示比较合适
修改
boot_images/QcomPkg/Library/MDPLib/DisplayUtils.c
static
VOID
CalculateLogoPosition(
IN UINT32 LogoWidth,
IN UINT32 LogoHeight,
OUT UINT32 *pPosX,
OUT UINT32 *pPosY,
RenderLogoParamsType *pRenderLogoParams)
// Calculate LogoPosX and LogoPosY based on platform panel resolution.
// Center of BGRT image should be at the horizontal center of the panel.
if (PanelWidth > LogoWidth)
{
LogoPosX = ((PanelWidth - LogoWidth)/2);
}
// Center of BGRT image should be at 38.2 percent of panel height from the top.
if (PanelHeight > LogoHeight)
{
//luffy modify
//LogoPosY = (0.382*PanelHeight) - (UINT32)(LogoHeight/2);
LogoPosY = ((PanelHeight - LogoHeight)/2);
}
源码中可以看出默认情况是水平方向居中,竖直方向是38.2%位置。
修改为LogoPosY = ((PanelHeight - LogoHeight)/2); 后,竖直方向也可以居中显示