summaryrefslogtreecommitdiffstats
path: root/minui/graphics.c
diff options
context:
space:
mode:
Diffstat (limited to 'minui/graphics.c')
-rw-r--r--minui/graphics.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/minui/graphics.c b/minui/graphics.c
index 32b3361..6049d85 100644
--- a/minui/graphics.c
+++ b/minui/graphics.c
@@ -369,10 +369,20 @@ int gr_init(void)
return -1;
}
- gr_backend = open_fbdev();
- gr_draw = gr_backend->init(gr_backend);
- if (gr_draw == NULL) {
- return -1;
+ gr_backend = open_adf();
+ if (gr_backend) {
+ gr_draw = gr_backend->init(gr_backend);
+ if (!gr_draw) {
+ gr_backend->exit(gr_backend);
+ }
+ }
+
+ if (!gr_draw) {
+ gr_backend = open_fbdev();
+ gr_draw = gr_backend->init(gr_backend);
+ if (gr_draw == NULL) {
+ return -1;
+ }
}
overscan_offset_x = gr_draw->width * overscan_percent / 100;