1
0
Fork 0
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:
Damjan Adamic 2016-01-02 20:21:30 +01:00
parent 826eb2569c
commit 03c9b2c4a2
3 changed files with 80 additions and 20 deletions

View file

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