Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added gr_font_size, gr_fb_blank

Change-Id: I922cb72744719793cc4b5d6e6e403f937fd8a876
  • Loading branch information...
commit 4f2ef31d53fcf56061b5f221f8d12183afb270f6 1 parent 6fce481
@atinm atinm authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 recovery/graphics.c
View
14 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");
+}
Please sign in to comment.
Something went wrong with that request. Please try again.