mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CVFD::ShowText: only scroll if necessary
This commit is contained in:
@@ -703,13 +703,17 @@ void CVFD::ShowIcon(fp_icon icon, bool show)
|
||||
void CVFD::ShowText(const char * str)
|
||||
{
|
||||
char flags[2] = { FP_FLAG_ALIGN_LEFT, 0 };
|
||||
if (! str) {
|
||||
printf("CVFD::ShowText: str is NULL!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_settings.lcd_scroll)
|
||||
if (g_settings.lcd_scroll && (strlen(str) > g_info.hw_caps->display_xres))
|
||||
flags[0] |= FP_FLAG_SCROLL_ON | FP_FLAG_SCROLL_SIO | FP_FLAG_SCROLL_DELAY;
|
||||
|
||||
std::string txt = std::string(flags) + str;
|
||||
txt = trim(txt);
|
||||
printf("CVFD::ShowText: [%s]\n", txt.c_str() + 1);
|
||||
printf("CVFD::ShowText: [0x%02x][%s]\n", flags[0], txt.c_str() + 1);
|
||||
|
||||
size_t len = txt.length();
|
||||
if (txt == text || len > 255)
|
||||
|
Reference in New Issue
Block a user