1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 04:45:17 +03:00

Transparent bitmaps supported/displayed in SD browser. BitmapBuffer: fixed wrong free() when using external data buffer.

This commit is contained in:
Damjan Adamic 2016-02-28 21:08:45 +01:00
parent 9a23c3fcc6
commit 5e96d02120
4 changed files with 41 additions and 20 deletions

View file

@ -366,11 +366,11 @@ bool menuGeneralSdManager(evt_t _event)
if (currentBitmapIndex != menuVerticalPosition) {
currentBitmapIndex = menuVerticalPosition;
delete currentBitmap;
currentBitmap = BitmapBuffer::load(reusableBuffer.sdmanager.lines[index]);
currentBitmap = BitmapBuffer::load(reusableBuffer.sdmanager.lines[index], true);
// TODO scale in case of a too large bitmap
}
if (currentBitmap) {
lcd->drawBitmap(LCD_W / 2, LCD_H / 2, currentBitmap);
lcd->drawAlphaBitmap(LCD_W / 2, LCD_H / 2, currentBitmap);
}
}