Browse Source

Patch SD file draw bug

pull/1/head
Scott Lahteine 7 years ago
parent
commit
de84f57a9c
  1. 5
      Marlin/src/lcd/ultralcd_impl_DOGM.h

5
Marlin/src/lcd/ultralcd_impl_DOGM.h

@ -928,14 +928,15 @@ static void lcd_implementation_status_screen() {
if (!PAGE_CONTAINS(row_y1, row_y2)) return; if (!PAGE_CONTAINS(row_y1, row_y2)) return;
uint8_t n = LCD_WIDTH - (START_COL) - 1; uint8_t n = LCD_WIDTH - (START_COL) - 1;
char c;
if (longFilename[0]) { if (longFilename[0]) {
filename = longFilename; filename = longFilename;
longFilename[n] = '\0'; longFilename[n] = '\0'; // cutoff at screen edge
} }
if (isDir) lcd_print(LCD_STR_FOLDER[0]); if (isDir) lcd_print(LCD_STR_FOLDER[0]);
while (char c = *filename) { while ((c = *filename) && n > 0) {
n -= lcd_print_and_count(c); n -= lcd_print_and_count(c);
filename++; filename++;
} }

Loading…
Cancel
Save