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).
This commit is contained in:
parent
a3f89eabb7
commit
196c25c777
6
ui.c
6
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user