From 219e8313f6a484d4277315699df5ca17692b52fc Mon Sep 17 00:00:00 2001 From: zhangzhaopeng Date: Fri, 14 Mar 2025 18:03:56 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8Dlogo=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E4=B8=8D=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../linux-4.9/drivers/video/fbdev/sunxi/disp2/disp/dev_fb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lichee/linux-4.9/drivers/video/fbdev/sunxi/disp2/disp/dev_fb.c b/lichee/linux-4.9/drivers/video/fbdev/sunxi/disp2/disp/dev_fb.c index e5f31d217..5c5968f13 100644 --- a/lichee/linux-4.9/drivers/video/fbdev/sunxi/disp2/disp/dev_fb.c +++ b/lichee/linux-4.9/drivers/video/fbdev/sunxi/disp2/disp/dev_fb.c @@ -2643,7 +2643,7 @@ static int fb_display_logo(void *param) } #if 0 -pr_emerg("data start in %d bytes\n", fileheader.bfOffBits); + pr_emerg("data start in %d bytes\n", fileheader.bfOffBits); pr_emerg("File Size: %u bytes\n", fileheader.bfSize); pr_emerg("Image Width: %d pixels\n", infoheader.biWidth); pr_emerg("Image Height: %d pixels\n", infoheader.biHeight); @@ -2677,7 +2677,8 @@ pr_emerg("data start in %d bytes\n", fileheader.bfOffBits); return -1; } /* 自动居中 */ - pos = ((pic_info.screen_height / 2 - infoheader.biHeight / 2) * pic_info.screen_width) + pic_info.screen_width / 2 - infoheader.biHeight / 2; + pos = ((pic_info.screen_height / 2 - infoheader.biHeight / 2) * pic_info.screen_width) + pic_info.screen_width / 2 - infoheader.biWidth / 2; + // pr_emerg("x:%d y:%d\n", (pic_info.screen_width / 2 - infoheader.biWidth / 2), (pic_info.screen_height / 2 - infoheader.biHeight / 2)); /* 记录ioctl刷新信息 */ pic_info.vaddr = &(fb_dst[pos * sizeof(int)]); pic_info.size = (infoheader.biHeight * pic_info.screen_width) * sizeof(int);