1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 00:35:18 +03:00

JPEG also works

This commit is contained in:
Damjan Adamic 2016-01-02 20:33:29 +01:00
parent 03c9b2c4a2
commit acaa77daab
3 changed files with 5 additions and 4 deletions

View file

@ -367,10 +367,10 @@ bool menuGeneralSdManager(evt_t _event)
lcdDrawBitmap(LCD_W/2, (LCD_H-MODEL_BITMAP_HEIGHT)/2, modelBitmap);
}
if (ext && !strcasecmp(ext, ".png")) {
if (ext && (!strcasecmp(ext, ".png") || !strcasecmp(ext, ".jpg"))) {
if (lastBitmap != menuVerticalPosition) {
lastBitmap = menuVerticalPosition;
if (pngLoad(modelBitmap, reusableBuffer.sdmanager.lines[index], MODEL_BITMAP_WIDTH, MODEL_BITMAP_HEIGHT)) {
if (imgLoad(modelBitmap, reusableBuffer.sdmanager.lines[index], MODEL_BITMAP_WIDTH, MODEL_BITMAP_HEIGHT)) {
((uint32_t *)modelBitmap)[0] = 0;
}
}