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);