mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-30 21:00:39 +00:00
cleanup
svn-id: r17980
This commit is contained in:
parent
5702c16c16
commit
74aed6382b
@ -290,9 +290,7 @@ GraphicsWidget::~GraphicsWidget() {
|
||||
void GraphicsWidget::setGfx(const Graphics::Surface *gfx) {
|
||||
_gfx.free();
|
||||
|
||||
if (!gfx)
|
||||
return;
|
||||
if (!gfx->pixels)
|
||||
if (!gfx || !gfx->pixels)
|
||||
return;
|
||||
|
||||
// TODO: add conversion to OverlayColor
|
||||
@ -306,17 +304,8 @@ void GraphicsWidget::drawWidget(bool hilite) {
|
||||
// this widget might be used for other things than rendering savegame
|
||||
// graphics/previews...
|
||||
g_gui.drawString("No preview", _x, _y + _h / 2 - g_gui.getFontHeight() / 2, _w, g_gui._textcolor, Graphics::kTextAlignCenter);
|
||||
return;
|
||||
}
|
||||
|
||||
uint drawWidth = _gfx.w, drawHeight = _gfx.h;
|
||||
|
||||
if (_w < _gfx.w)
|
||||
drawWidth = _w;
|
||||
if (_h < _gfx.h)
|
||||
drawHeight = _h;
|
||||
|
||||
g_gui.drawSurface(_gfx, _x, _y);
|
||||
} else
|
||||
g_gui.drawSurface(_gfx, _x, _y);
|
||||
}
|
||||
|
||||
} // End of namespace GUI
|
||||
|
Loading…
Reference in New Issue
Block a user