summaryrefslogtreecommitdiffstats
path: root/minui/graphics.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-10-14 02:35:05 +0200
committerDees Troy <dees_troy@teamw.in>2015-10-14 20:16:12 +0200
commita59da09dd8c8eb071f6c4bafec88c433a4df808a (patch)
tree3aff65523efce1943798b5c87ed680ab8dca9799 /minui/graphics.cpp
parentAdd 16bpp support to minui (diff)
downloadandroid_bootable_recovery-a59da09dd8c8eb071f6c4bafec88c433a4df808a.tar
android_bootable_recovery-a59da09dd8c8eb071f6c4bafec88c433a4df808a.tar.gz
android_bootable_recovery-a59da09dd8c8eb071f6c4bafec88c433a4df808a.tar.bz2
android_bootable_recovery-a59da09dd8c8eb071f6c4bafec88c433a4df808a.tar.lz
android_bootable_recovery-a59da09dd8c8eb071f6c4bafec88c433a4df808a.tar.xz
android_bootable_recovery-a59da09dd8c8eb071f6c4bafec88c433a4df808a.tar.zst
android_bootable_recovery-a59da09dd8c8eb071f6c4bafec88c433a4df808a.zip
Diffstat (limited to '')
-rw-r--r--minui/graphics.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/minui/graphics.cpp b/minui/graphics.cpp
index 4c7dd3f5c..76ef56e70 100644
--- a/minui/graphics.cpp
+++ b/minui/graphics.cpp
@@ -470,18 +470,37 @@ void gr_flip() {
int gr_init(void)
{
gr_init_font();
+ gr_draw = NULL;
- gr_backend = open_adf();
+ gr_backend = open_overlay();
if (gr_backend) {
gr_draw = gr_backend->init(gr_backend);
if (!gr_draw) {
gr_backend->exit(gr_backend);
+ } else
+ printf("Using overlay graphics.\n");
+ }
+
+#ifndef MSM_BSP
+ if (!gr_draw) {
+ gr_backend = open_adf();
+ if (gr_backend) {
+ gr_draw = gr_backend->init(gr_backend);
+ if (!gr_draw) {
+ gr_backend->exit(gr_backend);
+ } else
+ printf("Using adf graphics.\n");
}
}
+#else
+ printf("Skipping adf graphics because TW_TARGET_USES_QCOM_BSP := true\n");
+#endif
if (!gr_draw) {
gr_backend = open_drm();
gr_draw = gr_backend->init(gr_backend);
+ if (gr_draw)
+ printf("Using drm graphics.\n");
}
if (!gr_draw) {
@@ -489,7 +508,8 @@ int gr_init(void)
gr_draw = gr_backend->init(gr_backend);
if (gr_draw == NULL) {
return -1;
- }
+ } else
+ printf("Using fbdev graphics.\n");
}
overscan_offset_x = gr_draw->width * overscan_percent / 100;