diff options
author | Greg Hackmann <ghackmann@google.com> | 2014-05-03 01:20:14 +0200 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-03 01:20:14 +0200 |
commit | 1cd5242349bb1ef10eca76ff2c3e17415aecdf9d (patch) | |
tree | ff5664422cc34ae677cd875251abd2c6c724da04 /minui/graphics.c | |
parent | Merge commit '25c2b2f670a3b11f7ce78eccde10c1a79188c9a8' into HEAD (diff) | |
parent | Merge "recovery: minui: add adf backend" (diff) | |
download | android_bootable_recovery-1cd5242349bb1ef10eca76ff2c3e17415aecdf9d.tar android_bootable_recovery-1cd5242349bb1ef10eca76ff2c3e17415aecdf9d.tar.gz android_bootable_recovery-1cd5242349bb1ef10eca76ff2c3e17415aecdf9d.tar.bz2 android_bootable_recovery-1cd5242349bb1ef10eca76ff2c3e17415aecdf9d.tar.lz android_bootable_recovery-1cd5242349bb1ef10eca76ff2c3e17415aecdf9d.tar.xz android_bootable_recovery-1cd5242349bb1ef10eca76ff2c3e17415aecdf9d.tar.zst android_bootable_recovery-1cd5242349bb1ef10eca76ff2c3e17415aecdf9d.zip |
Diffstat (limited to 'minui/graphics.c')
-rw-r--r-- | minui/graphics.c | 18 |
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; |