From 196c25c777daedbe2fe5a45171fb42e43ceed9af Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Tue, 15 Sep 2009 08:50:04 -0700 Subject: don't complain if recovery icon is short If the a recovery icon file is so short that we can't even read the 8-byte header, put a message in the log but not on the device screen. We intentionally have zero-length files for some icons on some devices, if they're never shown (eg, the firmware installation icons are only used on HTC devices). --- ui.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui.c b/ui.c index 0a8b985bb..51df1fa9f 100644 --- a/ui.c +++ b/ui.c @@ -339,7 +339,11 @@ void ui_init(void) for (i = 0; BITMAPS[i].name != NULL; ++i) { int result = res_create_surface(BITMAPS[i].name, BITMAPS[i].surface); if (result < 0) { - LOGE("Missing bitmap %s\n(Code %d)\n", BITMAPS[i].name, result); + if (result == -2) { + LOGI("Bitmap %s missing header\n", BITMAPS[i].name); + } else { + LOGE("Missing bitmap %s\n(Code %d)\n", BITMAPS[i].name, result); + } *BITMAPS[i].surface = NULL; } } -- cgit v1.2.3