diff options
author | Johannes Schickel | 2011-04-17 17:30:29 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-04-17 20:58:07 +0200 |
commit | 41586398abb45c6e0551da729471c4215299d131 (patch) | |
tree | 9e9e7011cc213f0987fc93d13f8b0c65692680c1 | |
parent | 9bc39fc761d58f3b932a682369bc68d7706ade02 (diff) | |
download | scummvm-rg350-41586398abb45c6e0551da729471c4215299d131.tar.gz scummvm-rg350-41586398abb45c6e0551da729471c4215299d131.tar.bz2 scummvm-rg350-41586398abb45c6e0551da729471c4215299d131.zip |
GUI: Do not access Surface::bytesPerPixel anymore.
-rw-r--r-- | gui/widget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp index 7a694860d6..b7a10b17d7 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -345,7 +345,7 @@ void PicButtonWidget::setGfx(const Graphics::Surface *gfx) { void PicButtonWidget::drawWidget() { g_gui.theme()->drawButton(Common::Rect(_x, _y, _x+_w, _y+_h), "", _state, getFlags()); - if (sizeof(OverlayColor) == _gfx.bytesPerPixel && _gfx.pixels) { + if (sizeof(OverlayColor) == _gfx.format.bytesPerPixel && _gfx.pixels) { const int x = _x + (_w - _gfx.w) / 2; const int y = _y + (_h - _gfx.h) / 2; @@ -588,7 +588,7 @@ void GraphicsWidget::setGfx(int w, int h, int r, int g, int b) { } void GraphicsWidget::drawWidget() { - if (sizeof(OverlayColor) == _gfx.bytesPerPixel && _gfx.pixels) { + if (sizeof(OverlayColor) == _gfx.format.bytesPerPixel && _gfx.pixels) { const int x = _x + (_w - _gfx.w) / 2; const int y = _y + (_h - _gfx.h) / 2; |