Bugfix: Clear font_height_mode during setup to ensure correct default values in

cases where the u8g2 struct / class is created via dynamic memory allocation (issue #2046)
This commit is contained in:
kraus 2022-12-11 09:24:32 +01:00
parent 90b190043d
commit 325fbe7d0e
2 changed files with 3 additions and 2 deletions

View File

@ -303,5 +303,5 @@ https://github.com/olikraus/u8g2 ChangeLog
* SSD1316 96x32 (issue 1938) * SSD1316 96x32 (issue 1938)
* SH1108 128x160 (issue 1998) * SH1108 128x160 (issue 1998)
* SSD1306 96x39 (issue 1959) * SSD1306 96x39 (issue 1959)
* Bugfix: Clear font_height_mode during setup to ensure correct default values in
cases where the u8g2 struct / class is created via dynamic memory allocation (issue 2046)

View File

@ -85,6 +85,7 @@ void u8g2_SetupBuffer(u8g2_t *u8g2, uint8_t *buf, uint8_t tile_buf_height, u8g2_
u8g2->font_decode.is_transparent = 0; /* issue 443 */ u8g2->font_decode.is_transparent = 0; /* issue 443 */
u8g2->bitmap_transparency = 0; u8g2->bitmap_transparency = 0;
u8g2->font_height_mode = 0; /* issue 2046 */
u8g2->draw_color = 1; u8g2->draw_color = 1;
u8g2->is_auto_page_clear = 1; u8g2->is_auto_page_clear = 1;