aboutsummaryrefslogtreecommitdiff
path: root/gui/widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/widget.cpp')
-rw-r--r--gui/widget.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp
index e9afc30301..31f76eac6f 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -363,8 +363,7 @@ void GraphicsWidget::setGfx(const Graphics::Surface *gfx) {
return;
// TODO: add conversion to OverlayColor
- _gfx.create(gfx->w, gfx->h, gfx->bytesPerPixel);
- memcpy(_gfx.pixels, gfx->pixels, gfx->h * gfx->pitch);
+ _gfx.copyFrom(*gfx);
}
void GraphicsWidget::setGfx(int w, int h, int r, int g, int b) {