summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-04-30 22:58:17 +0200
committerWolfgang Denk <wd@denx.de>2009-04-30 22:58:17 +0200
commitfaf4fe76081c5b25129be1eaa85412124bfe180a (patch)
tree3a71dc6b7f307bd31f63e9bb9d3a2cf62d7cb965 /drivers
parent4d9eab89b3b2c2ed432b14d355a56f274d8aac75 (diff)
parent3dcbe628d66b648e954bc8147d4faff2983206d9 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-video
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/cfb_console.c36
1 files changed, 33 insertions, 3 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 779aa4b53e..5ee2314f3c 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1181,6 +1181,7 @@ static void *video_logo (void)
{
char info[128];
extern char version_string;
+ int space, len, y_off = 0;
#ifdef CONFIG_SPLASH_SCREEN
char *s;
@@ -1198,7 +1199,19 @@ static void *video_logo (void)
logo_plot (video_fb_address, VIDEO_COLS, 0, 0);
sprintf (info, " %s", &version_string);
- video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *)info);
+
+ space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
+ len = strlen(info);
+
+ if (len > space) {
+ video_drawchars (VIDEO_INFO_X, VIDEO_INFO_Y,
+ (uchar *)info, space);
+ video_drawchars (VIDEO_INFO_X + VIDEO_FONT_WIDTH,
+ VIDEO_INFO_Y + VIDEO_FONT_HEIGHT,
+ (uchar *)info + space, len - space);
+ y_off = 1;
+ } else
+ video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *)info);
#ifdef CONFIG_CONSOLE_EXTRA_INFO
{
@@ -1206,10 +1219,27 @@ static void *video_logo (void)
for (i = 1; i < n; i++) {
video_get_info_str (i, info);
- if (*info)
+ if (!*info)
+ continue;
+
+ len = strlen(info);
+ if (len > space) {
+ video_drawchars (VIDEO_INFO_X,
+ VIDEO_INFO_Y +
+ (i + y_off) * VIDEO_FONT_HEIGHT,
+ (uchar *)info, space);
+ y_off++;
+ video_drawchars (VIDEO_INFO_X + VIDEO_FONT_WIDTH,
+ VIDEO_INFO_Y +
+ (i + y_off) * VIDEO_FONT_HEIGHT,
+ (uchar *)info + space,
+ len - space);
+ } else {
video_drawstring (VIDEO_INFO_X,
- VIDEO_INFO_Y + i * VIDEO_FONT_HEIGHT,
+ VIDEO_INFO_Y +
+ (i + y_off) * VIDEO_FONT_HEIGHT,
(uchar *)info);
+ }
}
}
#endif