[Scummvm-cvs-logs] CVS: scummvm/gui widget.cpp,1.43,1.44
Max Horn
fingolfin at users.sourceforge.net
Sun May 8 16:41:31 CEST 2005
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20465
Modified Files:
widget.cpp
Log Message:
cleanup
Index: widget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/widget.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- widget.cpp 8 May 2005 22:38:29 -0000 1.43
+++ widget.cpp 8 May 2005 23:39:37 -0000 1.44
@@ -290,9 +290,7 @@
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 @@
// 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
More information about the Scummvm-git-logs
mailing list