Selaa lähdekoodia

Only show custom bootscreen once

Scott Lahteine 7 vuotta sitten
vanhempi
commit
a516856df9
1 muutettua tiedostoa jossa 9 lisäystä ja 7 poistoa
  1. 9
    7
      Marlin/src/lcd/ultralcd_impl_DOGM.h

+ 9
- 7
Marlin/src/lcd/ultralcd_impl_DOGM.h Näytä tiedosto

@@ -278,6 +278,8 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
278 278
 
279 279
 #if ENABLED(SHOW_BOOTSCREEN)
280 280
 
281
+  bool show_bootscreen = true;
282
+
281 283
   #if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
282 284
 
283 285
     void lcd_custom_bootscreen() {
@@ -294,8 +296,6 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
294 296
 
295 297
   void lcd_bootscreen() {
296 298
 
297
-    static bool show_bootscreen = true;
298
-
299 299
     if (show_bootscreen) {
300 300
       show_bootscreen = false;
301 301
 
@@ -353,11 +353,13 @@ static void lcd_implementation_init() {
353 353
   #endif
354 354
 
355 355
   #if ENABLED(SHOW_BOOTSCREEN)
356
-    #if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
357
-      lcd_custom_bootscreen();
358
-    #else
359
-      lcd_bootscreen();
360
-    #endif
356
+    if (show_bootscreen) {
357
+      #if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
358
+        lcd_custom_bootscreen();
359
+      #else
360
+        lcd_bootscreen();
361
+      #endif
362
+    }
361 363
   #endif
362 364
 }
363 365
 

Loading…
Peruuta
Tallenna