From 4f2ef31d53fcf56061b5f221f8d12183afb270f6 Mon Sep 17 00:00:00 2001 From: atinm Date: Sat, 19 Nov 2011 07:59:13 -0500 Subject: Added gr_font_size, gr_fb_blank Change-Id: I922cb72744719793cc4b5d6e6e403f937fd8a876 --- recovery/graphics.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/recovery/graphics.c b/recovery/graphics.c index 1334e42..87e4e29 100644 --- a/recovery/graphics.c +++ b/recovery/graphics.c @@ -179,6 +179,12 @@ int gr_measure(const char *s) return gr_font->cwidth * strlen(s); } +void gr_font_size(int *x, int *y) +{ + *x = gr_font->cwidth; + *y = gr_font->cheight; +} + int gr_text(int x, int y, const char *s) { GGLContext *gl = gr_context; @@ -337,3 +343,11 @@ gr_pixel *gr_fb_data(void) return (unsigned short *) gr_mem_surface.data; } +void gr_fb_blank(bool blank) +{ + int ret; + + ret = ioctl(gr_fb_fd, FBIOBLANK, blank ? FB_BLANK_POWERDOWN : FB_BLANK_UNBLANK); + if (ret < 0) + perror("ioctl(): blank"); +} -- cgit v1.1