From d5c34453d31a1f5c3ba28e6e2dc06469bd3b2a07 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Mon, 28 Oct 2019 17:05:41 +0100 Subject: [PATCH] Issue with bitmaps scale --- radio/src/thirdparty/libopenui/src/bitmapbuffer.h | 12 +++++++----- radio/src/thirdparty/libopenui/src/filechoice.cpp | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/radio/src/thirdparty/libopenui/src/bitmapbuffer.h b/radio/src/thirdparty/libopenui/src/bitmapbuffer.h index a8bbb0fe8..808435001 100644 --- a/radio/src/thirdparty/libopenui/src/bitmapbuffer.h +++ b/radio/src/thirdparty/libopenui/src/bitmapbuffer.h @@ -411,12 +411,14 @@ class BitmapBuffer: public BitmapBufferBase 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) diff --git a/radio/src/thirdparty/libopenui/src/filechoice.cpp b/radio/src/thirdparty/libopenui/src/filechoice.cpp index ddca3da82..780acdd63 100644 --- a/radio/src/thirdparty/libopenui/src/filechoice.cpp +++ b/radio/src/thirdparty/libopenui/src/filechoice.cpp @@ -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