summaryrefslogtreecommitdiffstats
path: root/lib/gui
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-01-16 05:02:24 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-01-16 21:33:14 +0100
commitcef34886b745cf3f6dff55bf326e29a5857b2206 (patch)
treeb15695add6f1e4899637b5ac1d2b7da01408d82f /lib/gui
parentcbc3e0f6d40bdea8f960e9f1aba1e9d5b836f01c (diff)
downloadbarebox-cef34886b745cf3f6dff55bf326e29a5857b2206.tar.gz
barebox-cef34886b745cf3f6dff55bf326e29a5857b2206.tar.xz
graphic_utils/fb_open: fix fbsize
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib/gui')
-rw-r--r--lib/gui/graphic_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gui/graphic_utils.c b/lib/gui/graphic_utils.c
index 3800ee2832..95687df13e 100644
--- a/lib/gui/graphic_utils.c
+++ b/lib/gui/graphic_utils.c
@@ -219,7 +219,7 @@ int fb_open(const char * fbdev, struct screen *sc, bool offscreen)
sc->s.y = 0;
sc->s.width = sc->info.xres;
sc->s.height = sc->info.yres;
- sc->fbsize = sc->s.x * sc->s.x * (sc->info.bits_per_pixel >> 3);
+ sc->fbsize = sc->s.width * sc->s.height * (sc->info.bits_per_pixel >> 3);
if (offscreen) {
/* Don't fail if malloc fails, just continue rendering directly