summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-03-06 09:58:49 -0500
committerChristopher Michael <cp.michael@samsung.com>2019-03-21 14:00:15 -0400
commitde94b6ae723b2653e980b7727083cb49d5cb4f21 (patch)
tree30fed20c93a5c0568b201779db3cedb8399c9965
parentd0c777b3b8e18ba44439deb51d6e8347fae33f9b (diff)
ecore-drm2: Factor in output rotation when getting output info
Enlightenment uses this function to get information about a given output, so we should be accounting for output rotation when returning width/height values. ref T7690 @fix Differential Revision: https://phab.enlightenment.org/D8115
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index c7540236f5..6734cacdff 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -1675,8 +1675,21 @@ ecore_drm2_output_info_get(Ecore_Drm2_Output *output, int *x, int *y, int *w, in
1675 EINA_SAFETY_ON_NULL_RETURN(output); 1675 EINA_SAFETY_ON_NULL_RETURN(output);
1676 EINA_SAFETY_ON_TRUE_RETURN(!output->current_mode); 1676 EINA_SAFETY_ON_TRUE_RETURN(!output->current_mode);
1677 1677
1678 if (w) *w = output->current_mode->width; 1678 switch (output->rotation)
1679 if (h) *h = output->current_mode->height; 1679 {
1680 case ECORE_DRM2_ROTATION_90:
1681 case ECORE_DRM2_ROTATION_270:
1682 if (w) *w = output->current_mode->height;
1683 if (h) *h = output->current_mode->width;
1684 break;
1685 case ECORE_DRM2_ROTATION_NORMAL:
1686 case ECORE_DRM2_ROTATION_180:
1687 default:
1688 if (w) *w = output->current_mode->width;
1689 if (h) *h = output->current_mode->height;
1690 break;
1691 }
1692
1680 if (refresh) *refresh = output->current_mode->refresh; 1693 if (refresh) *refresh = output->current_mode->refresh;
1681 if (x) *x = output->x; 1694 if (x) *x = output->x;
1682 if (y) *y = output->y; 1695 if (y) *y = output->y;