浏览代码

Only show custom bootscreen once

Scott Lahteine 7 年前
父节点
当前提交
a516856df9
共有 1 个文件被更改,包括 9 次插入7 次删除
  1. 9
    7
      Marlin/src/lcd/ultralcd_impl_DOGM.h

+ 9
- 7
Marlin/src/lcd/ultralcd_impl_DOGM.h 查看文件

@@ -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
 

正在加载...
取消
保存