Browse Source

Animated boot followup

Scott Lahteine 4 years ago
parent
commit
87d32647f1
1 changed files with 9 additions and 6 deletions
  1. 9
    6
      Marlin/src/lcd/dogm/marlinui_DOGM.cpp

+ 9
- 6
Marlin/src/lcd/dogm/marlinui_DOGM.cpp View File

@@ -116,13 +116,16 @@ bool MarlinUI::detected() { return true; }
116 116
                             bottom = top + CUSTOM_BOOTSCREEN_BMPHEIGHT;
117 117
       #endif
118 118
 
119
-      const void * const frame_ptr = pgm_read_ptr(&custom_bootscreen_animation[frame]);
120
-
121
-      #if BOTH(CUSTOM_BOOTSCREEN_ANIMATED, CUSTOM_BOOTSCREEN_TIME_PER_FRAME)
122
-        const boot_frame_t * const frame_info = (boot_frame_t*)frame_ptr;
123
-        const u8g_pgm_uint8_t * const bmp = (u8g_pgm_uint8_t*)pgm_read_ptr(&frame_info->bitmap);
119
+      #if ENABLED(CUSTOM_BOOTSCREEN_ANIMATED)
120
+        const void * const frame_ptr = pgm_read_ptr(&custom_bootscreen_animation[frame]);
121
+        #if ENABLED(CUSTOM_BOOTSCREEN_TIME_PER_FRAME)
122
+          const boot_frame_t * const frame_info = (boot_frame_t*)frame_ptr;
123
+          const u8g_pgm_uint8_t * const bmp = (u8g_pgm_uint8_t*)pgm_read_ptr(&frame_info->bitmap);
124
+        #else
125
+          const u8g_pgm_uint8_t * const bmp = (u8g_pgm_uint8_t*)frame_ptr;
126
+        #endif
124 127
       #else
125
-        const u8g_pgm_uint8_t * const bmp = TERN(CUSTOM_BOOTSCREEN_ANIMATED, (u8g_pgm_uint8_t*)frame_ptr, custom_start_bmp);
128
+        const u8g_pgm_uint8_t * const bmp = custom_start_bmp;
126 129
       #endif
127 130
 
128 131
       UNUSED(frame);

Loading…
Cancel
Save