summaryrefslogtreecommitdiffstats
path: root/minui/graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'minui/graphics.cpp')
-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;