void ScreenRecoveryUI::LoadBitmap(const char* filename, gr_surface* surface, const char* theme_name = "default") {
    int result = 0;
    if (strcmp(theme_name, "default")) {
        result = res_create_theme_display_surface(filename, theme_name, surface);
    } else {
        result = res_create_display_surface(filename, surface);
    }
    if (result < 0) {
        LOGE("missing bitmap %s\n(Code %d)\n", filename, result);
        res_create_display_surface(filename, surface);
    }
}
static void draw(const char *resname)
{
    GRSurface* surface;
    int w, h, x, y;

    if (res_create_display_surface(resname, &surface) < 0) {
        LOGE("failed to create surface for %s\n", resname);
        return;
    }

    w = gr_get_width(surface);
    h = gr_get_height(surface);
    x = (gr_fb_width() - w) / 2;
    y = (gr_fb_height() - h) / 2;

    gr_blit(surface, 0, 0, w, h, x, y);
    gr_flip();

    res_free_surface(surface);
}
void ScreenRecoveryUI::LoadBitmap(const char* filename, GRSurface** surface) {
    int result = res_create_display_surface(filename, surface);
    if (result < 0) {
        LOGE("missing bitmap %s\n(Code %d)\n", filename, result);
    }
}
void ScreenRecoveryUI::LoadBitmap(const char* filename, GRSurface** surface) {
    int result = res_create_display_surface(filename, surface);
    if (result < 0) {
        LOGE("couldn't load bitmap %s (error %d)\n", filename, result);
    }
}