This commit is contained in:
Scott Lahteine 2020-11-12 22:38:33 -06:00 committed by GitHub
parent dddf08bf43
commit 64989d6fbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,19 +208,13 @@ millis_t MarlinUI::next_button_update_ms; // = 0
filename_scroll_pos = 0; // Reset scroll to the start filename_scroll_pos = 0; // Reset scroll to the start
lcd_status_update_delay = 8; // Don't scroll right away lcd_status_update_delay = 8; // Don't scroll right away
} }
#if ENABLED(UTF_FILENAME_SUPPORT) // Advance byte position corresponding to filename_scroll_pos char position
// Advance byte position corresponding to filename_scroll_pos char position outstr += TERN(UTF_FILENAME_SUPPORT, utf8_byte_pos_by_char_num(outstr, filename_scroll_pos), filename_scroll_pos);
outstr += utf8_byte_pos_by_char_num(outstr, filename_scroll_pos);
#else
outstr += filename_scroll_pos;
#endif
} }
#else #else
#if ENABLED(UTF_FILENAME_SUPPORT) theCard.longFilename[
theCard.longFilename[utf8_byte_pos_by_char_num(theCard.longFilename, maxlen)] = '\0'; // cutoff at screen edge TERN(UTF_FILENAME_SUPPORT, utf8_byte_pos_by_char_num(theCard.longFilename, maxlen), maxlen)
#else ] = '\0'; // cutoff at screen edge
theCard.longFilename[maxlen] = '\0'; // cutoff at screen edge
#endif
#endif #endif
} }
return outstr; return outstr;