Procházet zdrojové kódy

Merge pull request #8182 from thinkyhead/bf1_fix_bootscreen_repeat

[1.1.x] Only show custom bootscreen once
Scott Lahteine před 7 roky
rodič
revize
b48a77c88a
No account linked to committer's email address
1 změnil soubory, kde provedl 9 přidání a 7 odebrání
  1. 9
    7
      Marlin/ultralcd_impl_DOGM.h

+ 9
- 7
Marlin/ultralcd_impl_DOGM.h Zobrazit soubor

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

Loading…
Zrušit
Uložit