Issue with bitmaps scale

This commit is contained in:
Bertrand Songis
2019-10-28 17:05:41 +01:00
parent 02e0964000
commit d5c34453d3
2 changed files with 8 additions and 6 deletions
+7 -5
View File
@@ -411,12 +411,14 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
y = ymin;
}
if (x + w > xmax) {
w = xmax - x;
}
if (scale == 0) {
if (x + w > xmax) {
w = xmax - x;
}
if (y + h > ymax) {
h = ymax - y;
if (y + h > ymax) {
h = ymax - y;
}
}
if (w <= 0 || h <= 0)
+1 -1
View File
@@ -68,7 +68,7 @@ bool FileChoice::openMenu()
continue; // skip system files
fnExt = getFileExtension(fno.fname, 0, 0, &fnLen, &extLen);
fnLen -= extLen;
// fnLen -= extLen;
if (!fnLen || fnLen > maxlen)
continue; // wrong size