|
|
|
@ -62,8 +62,6 @@ static struct animation anim = {
|
|
|
|
|
.num_frames = 0,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static bool font_inited;
|
|
|
|
|
|
|
|
|
|
static int draw_surface_centered(GRSurface* surface)
|
|
|
|
|
{
|
|
|
|
|
int w, h, x, y;
|
|
|
|
@ -85,14 +83,14 @@ static void draw_capacity(int capacity)
|
|
|
|
|
|
|
|
|
|
struct frame *f = &anim.frames[0];
|
|
|
|
|
int font_x, font_y;
|
|
|
|
|
gr_font_size(&font_x, &font_y);
|
|
|
|
|
int w = gr_measure(cap_str);
|
|
|
|
|
gr_font_size(gr_sys_font(), &font_x, &font_y);
|
|
|
|
|
int w = gr_measure(gr_sys_font(), cap_str);
|
|
|
|
|
int h = gr_get_height(f->surface);
|
|
|
|
|
int x = (gr_fb_width() - w) / 2;
|
|
|
|
|
int y = (gr_fb_height() + h) / 2;
|
|
|
|
|
|
|
|
|
|
gr_color(255, 255, 255, 255);
|
|
|
|
|
gr_text(x, y + font_y / 2, cap_str, 0);
|
|
|
|
|
gr_text(gr_sys_font(), x, y + font_y / 2, cap_str, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef QCOM_HARDWARE
|
|
|
|
@ -337,11 +335,6 @@ void healthd_board_mode_charger_draw_battery(
|
|
|
|
|
int start_frame = 0;
|
|
|
|
|
int capacity = -1;
|
|
|
|
|
|
|
|
|
|
if (!font_inited) {
|
|
|
|
|
gr_set_font("log");
|
|
|
|
|
font_inited = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (batt_prop && batt_prop->batteryLevel >= 0) {
|
|
|
|
|
capacity = batt_prop->batteryLevel;
|
|
|
|
|
}
|
|
|
|
|