diff options
Diffstat (limited to 'apps/gui/splash.c')
-rw-r--r-- | apps/gui/splash.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index d0f1fbb67c..e8ad591264 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c | |||
@@ -90,6 +90,18 @@ static bool splash_internal(struct screen * screen, const char *fmt, va_list ap, | |||
90 | break; /* screen full or out of lines */ | 90 | break; /* screen full or out of lines */ |
91 | x = 0; | 91 | x = 0; |
92 | y += chr_h; | 92 | y += chr_h; |
93 | |||
94 | /* split when it fits since we didn't find a valid token to break on */ | ||
95 | size_t nl = next_len; | ||
96 | while (w > vp->width && --nl > 0) | ||
97 | w = font_getstringnsize(next, nl, NULL, NULL, fontnum); | ||
98 | |||
99 | if (nl > 1 && nl != next_len) | ||
100 | { | ||
101 | next_len = nl; | ||
102 | store = next + nl; /* move the start pos for the next token read */ | ||
103 | } | ||
104 | |||
93 | lines[++line].len = next_len; | 105 | lines[++line].len = next_len; |
94 | lines[line].str = next; | 106 | lines[line].str = next; |
95 | } | 107 | } |