Bläddra i källkod

update:u8g2 font_file字段相关代码使用luatos才生效

PeakRacing 1 månad sedan
förälder
incheckning
9156439fa3
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2 0
      components/u8g2/u8g2_font.c

+ 2 - 0
components/u8g2/u8g2_font.c

@@ -1402,10 +1402,12 @@ void u8g2_SetFont(u8g2_t *u8g2, const uint8_t  *font)
     }else
 #endif
     {
+#if (defined __LUATOS__) || defined (__USER_CODE__)
         if (u8g2->font_file) {
             luat_fs_fclose(u8g2->font_file);
             u8g2->font_file = NULL;
         }
+#endif
         u8g2_read_font_info(&(u8g2->font_info), font);
     }
     u8g2_UpdateRefHeight(u8g2);