From 0dd3d6472ead619a126ccd7692a048c7568680d1 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Fri, 26 Aug 2005 08:20:29 +0000 Subject: Bug fix suggested by Antonius Hellman, the status could be redrawn far too often. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7402 a1c6a512-1295-4272-9138-f99709370657 --- apps/status.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps/status.c') diff --git a/apps/status.c b/apps/status.c index 923b549bf0..b980c4d3eb 100644 --- a/apps/status.c +++ b/apps/status.c @@ -152,7 +152,10 @@ void status_set_usb(bool b) void status_draw(bool force_redraw) { - struct status_info info; + /* This is static because we use memcmp() below to check for changes, and + the unused bytes (due to struct member alignment) might change if + the struct is allocated on the stack. */ + static struct status_info info; #ifdef HAVE_LCD_BITMAP static struct status_info lastinfo; -- cgit v1.2.3