fix:修复logo图片不居中
This commit is contained in:
parent
20148e9d81
commit
219e8313f6
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue