summaryrefslogtreecommitdiffstats
path: root/minui/graphics.c
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2014-05-03 01:15:53 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-05-03 01:15:54 +0200
commit1c2cf1db0db2c9e9310d27bdc19c605f5537b72f (patch)
treeedc085397dbbaf95f28961ff70ab097289b2dbcb /minui/graphics.c
parentMerge "Change filesystem add entry API call." (diff)
parentrecovery: minui: add adf backend (diff)
downloadandroid_bootable_recovery-1c2cf1db0db2c9e9310d27bdc19c605f5537b72f.tar
android_bootable_recovery-1c2cf1db0db2c9e9310d27bdc19c605f5537b72f.tar.gz
android_bootable_recovery-1c2cf1db0db2c9e9310d27bdc19c605f5537b72f.tar.bz2
android_bootable_recovery-1c2cf1db0db2c9e9310d27bdc19c605f5537b72f.tar.lz
android_bootable_recovery-1c2cf1db0db2c9e9310d27bdc19c605f5537b72f.tar.xz
android_bootable_recovery-1c2cf1db0db2c9e9310d27bdc19c605f5537b72f.tar.zst
android_bootable_recovery-1c2cf1db0db2c9e9310d27bdc19c605f5537b72f.zip
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 32b3361e3..6049d85ca 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;