mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
PNG loading works
This commit is contained in:
parent
826eb2569c
commit
03c9b2c4a2
3 changed files with 80 additions and 20 deletions
|
@ -366,6 +366,16 @@ bool menuGeneralSdManager(evt_t _event)
|
|||
}
|
||||
lcdDrawBitmap(LCD_W/2, (LCD_H-MODEL_BITMAP_HEIGHT)/2, modelBitmap);
|
||||
}
|
||||
|
||||
if (ext && !strcasecmp(ext, ".png")) {
|
||||
if (lastBitmap != menuVerticalPosition) {
|
||||
lastBitmap = menuVerticalPosition;
|
||||
if (pngLoad(modelBitmap, reusableBuffer.sdmanager.lines[index], MODEL_BITMAP_WIDTH, MODEL_BITMAP_HEIGHT)) {
|
||||
((uint32_t *)modelBitmap)[0] = 0;
|
||||
}
|
||||
}
|
||||
lcdDrawBitmap(LCD_W/2, (LCD_H-MODEL_BITMAP_HEIGHT)/2, modelBitmap);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue