fixed build without image support

This commit is contained in:
thrust26 2023-09-14 19:37:27 +02:00
parent c6e72beeff
commit 6f7c96aef1
2 changed files with 11 additions and 8 deletions

View File

@ -559,12 +559,15 @@ void RomImageWidget::drawWidget(bool hilite)
return; return;
} }
#ifdef IMAGE_SUPPORT
if(mySurfaceIsValid) if(mySurfaceIsValid)
{ {
s.fillRect(_x, _y, _w, myImageHeight, 0); s.fillRect(_x, _y, _w, myImageHeight, 0);
positionSurfaces(); positionSurfaces();
} }
else if(!mySurfaceErrorMsg.empty()) else
#endif
if(!mySurfaceErrorMsg.empty())
{ {
const uInt32 x = _x + ((_w - _font.getStringWidth(mySurfaceErrorMsg)) >> 1); const uInt32 x = _x + ((_w - _font.getStringWidth(mySurfaceErrorMsg)) >> 1);
const uInt32 y = _y + ((myImageHeight - _font.getLineHeight()) >> 1); const uInt32 y = _y + ((myImageHeight - _font.getLineHeight()) >> 1);