diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index fed477f56c..2274345590 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -792,6 +792,18 @@ EAPI int ecore_drm2_output_supported_rotations_get(Ecore_Drm2_Output *output); */ EAPI Eina_Bool ecore_drm2_output_rotation_set(Ecore_Drm2_Output *output, int rotation); +/** + * Get current output rotation + * + * @param output + * + * @return An integer representing the output current rotation + * + * @ingroup Ecore_Drm2_Output_Group + * @since 1.22 + */ +EAPI int ecore_drm2_output_rotation_get(Ecore_Drm2_Output *output); + /** * Set the user data for the output's page flip handler * diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 7642025ef4..c7540236f5 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1576,6 +1576,13 @@ err: return ret; } +EAPI int +ecore_drm2_output_rotation_get(Ecore_Drm2_Output *output) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(output, -1); + return output->rotation; +} + EAPI unsigned int ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output) {