Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 196c25c7 authored by Doug Zongker's avatar Doug Zongker
Browse files

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).
parent a3f89eab
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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) {
            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;
        }
    }