summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-03-22 12:41:25 -0400
committerChristopher Michael <cp.michael@samsung.com>2019-03-22 12:41:25 -0400
commite63c36056e90c8fa1f07ec8c7a168e4a09832313 (patch)
treef7ab2c418954a2f4c4129ff8c9f7b4a20b9a4f24
parent828984393e82fe30b1d2a29a47e806cc827070a4 (diff)
ecore-drm2: Factor in output rotation when getting output info
Summary: 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 Depends on D8114 Reviewers: raster, cedric, zmike Reviewed By: cedric Subscribers: cedric Tags: #efl, #do_not_merge Maniphest Tasks: T7690 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;