summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-05-13 14:39:57 -0400
committerChris Michael <cp.michael@samsung.com>2015-05-13 14:42:15 -0400
commitd9b59f34d2bba43ba6b352789042199b9f746c47 (patch)
treefff006c024c92968c0da5398556a160bf8199050 /src/lib/ecore_drm
parent7d5d06bb20b2842619785b034e6fa15b080a53b1 (diff)
ecore-drm: Fix issue with output_current_resolution_get function
Summary: This fixes ecore_drm_output_current_resolution_get function to properly operate if an output does not have a current mode assigned. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index 8d922f8050..b2dbdfd932 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -1132,8 +1132,14 @@ ecore_drm_output_position_get(Ecore_Drm_Output *output, int *x, int *y)
1132EAPI void 1132EAPI void
1133ecore_drm_output_current_resolution_get(Ecore_Drm_Output *output, int *w, int *h, unsigned int *refresh) 1133ecore_drm_output_current_resolution_get(Ecore_Drm_Output *output, int *w, int *h, unsigned int *refresh)
1134{ 1134{
1135 if (w) *w = 0;
1136 if (h) *h = 0;
1137 if (refresh) *refresh = 0;
1138
1135 EINA_SAFETY_ON_NULL_RETURN(output); 1139 EINA_SAFETY_ON_NULL_RETURN(output);
1136 1140
1141 if (!output->current_mode) return;
1142
1137 if (w) *w = output->current_mode->width; 1143 if (w) *w = output->current_mode->width;
1138 if (h) *h = output->current_mode->height; 1144 if (h) *h = output->current_mode->height;
1139 if (refresh) *refresh = output->current_mode->refresh; 1145 if (refresh) *refresh = output->current_mode->refresh;