diff options
author | atinm <atinm.dev@gmail.com> | 2011-11-19 07:59:13 -0500 |
---|---|---|
committer | atinm <atinm.dev@gmail.com> | 2011-11-19 07:59:13 -0500 |
commit | 4f2ef31d53fcf56061b5f221f8d12183afb270f6 (patch) | |
tree | bfd55a0ac2c58e8128bc973d4be7e224bd662ea3 /recovery | |
parent | 6fce4816d5b8868b00dfaa6afc9b144cfbd1e8e2 (diff) | |
download | device_samsung_galaxysmtd-4f2ef31d53fcf56061b5f221f8d12183afb270f6.zip device_samsung_galaxysmtd-4f2ef31d53fcf56061b5f221f8d12183afb270f6.tar.gz device_samsung_galaxysmtd-4f2ef31d53fcf56061b5f221f8d12183afb270f6.tar.bz2 |
Added gr_font_size, gr_fb_blank
Change-Id: I922cb72744719793cc4b5d6e6e403f937fd8a876
Diffstat (limited to 'recovery')
-rw-r--r-- | recovery/graphics.c | 14 |
1 files changed, 14 insertions, 0 deletions
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"); +} |