mirror of https://github.com/stella-emu/stella.git
fixed build without image support
This commit is contained in:
parent
c6e72beeff
commit
6f7c96aef1
|
@ -559,17 +559,20 @@ void RomImageWidget::drawWidget(bool hilite)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef IMAGE_SUPPORT
|
||||
if(mySurfaceIsValid)
|
||||
{
|
||||
s.fillRect(_x, _y, _w, myImageHeight, 0);
|
||||
positionSurfaces();
|
||||
}
|
||||
else if(!mySurfaceErrorMsg.empty())
|
||||
{
|
||||
const uInt32 x = _x + ((_w - _font.getStringWidth(mySurfaceErrorMsg)) >> 1);
|
||||
const uInt32 y = _y + ((myImageHeight - _font.getLineHeight()) >> 1);
|
||||
s.drawString(_font, mySurfaceErrorMsg, x, y, _w - 10, _textcolor);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if(!mySurfaceErrorMsg.empty())
|
||||
{
|
||||
const uInt32 x = _x + ((_w - _font.getStringWidth(mySurfaceErrorMsg)) >> 1);
|
||||
const uInt32 y = _y + ((myImageHeight - _font.getLineHeight()) >> 1);
|
||||
s.drawString(_font, mySurfaceErrorMsg, x, y, _w - 10, _textcolor);
|
||||
}
|
||||
|
||||
// Draw the image label and counter
|
||||
ostringstream buf;
|
||||
|
|
|
@ -47,12 +47,12 @@ class RomImageWidget : public Widget
|
|||
uInt64 pendingLoadTime() { return myMaxLoadTime * timeFactor; }
|
||||
|
||||
protected:
|
||||
#ifdef IMAGE_SUPPORT
|
||||
#ifdef IMAGE_SUPPORT
|
||||
bool handleEvent(Event::Type event) override;
|
||||
void handleMouseUp(int x, int y, MouseButton b, int clickCount) override;
|
||||
void handleMouseMoved(int x, int y) override;
|
||||
void tick() override;
|
||||
#endif
|
||||
#endif
|
||||
void drawWidget(bool hilite) override;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue