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>
This commit is contained in:
Chris Michael 2015-05-13 14:39:57 -04:00
parent 7d5d06bb20
commit d9b59f34d2
1 changed files with 6 additions and 0 deletions

View File

@ -1132,8 +1132,14 @@ ecore_drm_output_position_get(Ecore_Drm_Output *output, int *x, int *y)
EAPI void
ecore_drm_output_current_resolution_get(Ecore_Drm_Output *output, int *w, int *h, unsigned int *refresh)
{
if (w) *w = 0;
if (h) *h = 0;
if (refresh) *refresh = 0;
EINA_SAFETY_ON_NULL_RETURN(output);
if (!output->current_mode) return;
if (w) *w = output->current_mode->width;
if (h) *h = output->current_mode->height;
if (refresh) *refresh = output->current_mode->refresh;