minui: Do not return true from target_has_overlay() if MSM_BSP is not set

Since target_has_overlay() was not ifdefed with MSM_BSP,
it would return true on some devices even if MSM_BSP was unset,
breaking LPM and some other minui functions.

Change-Id: Ic6b524fa0b5e36fc9ffe67d53e2bf33e9d4fd2d3
This commit is contained in:
Andrew Dodd
2014-06-29 18:24:35 -04:00
parent 5eac222cfe
commit bb687f4b13
2 changed files with 13 additions and 7 deletions
+4 -3
View File
@@ -77,7 +77,6 @@ static int map_mdp_pixel_format()
#endif
return format;
}
#endif // #ifdef MSM_BSP
static bool overlay_supported = false;
@@ -103,8 +102,6 @@ bool target_has_overlay(char *version)
return overlay_supported;
}
#ifdef MSM_BSP
int free_ion_mem(void) {
if (!overlay_supported)
return -EINVAL;
@@ -284,6 +281,10 @@ int overlay_display_frame(int fd, GGLubyte* data, size_t size)
#else
bool target_has_overlay(char *version) {
return false;
}
int free_ion_mem(void) {
return -EINVAL;
}
+9 -4
View File
@@ -80,7 +80,6 @@ static int map_mdp_pixel_format()
#endif
return format;
}
#endif // #ifdef MSM_BSP
static bool overlay_supported = false;
static bool isMDP5 = false;
@@ -104,7 +103,7 @@ bool target_has_overlay(char *version)
isMDP5 = true;
}
}
if (overlay_supported) printf("Using qcomm overlay\n");
if (overlay_supported) printf("Using qcomm overlay\n");
return overlay_supported;
}
@@ -116,8 +115,6 @@ bool isTargetMdp5()
return false;
}
#ifdef MSM_BSP
int free_ion_mem(void) {
if (!overlay_supported)
return -EINVAL;
@@ -426,6 +423,14 @@ int overlay_display_frame(int fd, GGLubyte* data, size_t size)
#else
bool target_has_overlay(char *version) {
return false;
}
bool isTargetMdp5() {
return false;
}
int free_ion_mem(void) {
return -EINVAL;
}