summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recovery/graphics.c14
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");
+}