aboutsummaryrefslogtreecommitdiff
path: root/gui/widget.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2012-06-12 04:16:51 +0200
committerJohannes Schickel2012-06-12 04:18:59 +0200
commit13f93494578818b5a1272d793f7412b6810f3321 (patch)
treee8b62babbaa1940252f7fb472a0d2e42a9da5b05 /gui/widget.cpp
parent0075fa2f98eb3deb4674a4f1af95a84669098d7c (diff)
downloadscummvm-rg350-13f93494578818b5a1272d793f7412b6810f3321.tar.gz
scummvm-rg350-13f93494578818b5a1272d793f7412b6810f3321.tar.bz2
scummvm-rg350-13f93494578818b5a1272d793f7412b6810f3321.zip
GUI: Take advantage of Surface::fillRect in GraphicsWidget::setGfx.
Diffstat (limited to 'gui/widget.cpp')
-rw-r--r--gui/widget.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp
index fc6510b976..657245c815 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -643,14 +643,7 @@ void GraphicsWidget::setGfx(int w, int h, int r, int g, int b) {
_gfx.free();
_gfx.create(w, h, overlayFormat);
-
- OverlayColor *dst = (OverlayColor *)_gfx.pixels;
- OverlayColor fillCol = overlayFormat.RGBToColor(r, g, b);
- while (h--) {
- for (int i = 0; i < w; ++i) {
- *dst++ = fillCol;
- }
- }
+ _gfx.fillRect(Common::Rect(0, 0, w, h), _gfx.format.RGBToColor(r, g, b));
}
void GraphicsWidget::drawWidget() {