This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch devs/devilhorns/apos
in repository efl.

View the commit online.

commit 0276e8a4145deb5ae1c35ee1dac6b34c64fc477a
Author: Christopher Michael <devilho...@comcast.net>
AuthorDate: Mon Oct 14 08:10:52 2024 -0400

    ecore_drm2: Add enum for aspect_ratio and set mode aspect ratio during
    mode creation
---
 src/lib/ecore_drm2/Ecore_Drm2.h          | 9 +++++++++
 src/lib/ecore_drm2/ecore_drm2_displays.c | 1 +
 src/lib/ecore_drm2/ecore_drm2_private.h  | 1 +
 3 files changed, 11 insertions(+)

diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 2ce608d26e..56862006f4 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -40,6 +40,15 @@ typedef enum _Ecore_Drm2_Relative_Mode
    ECORE_DRM2_RELATIVE_MODE_TO_BELOW
 } Ecore_Drm2_Relative_Mode;
 
+typedef enum _Ecore_Drm2_Aspect_Ratio
+{
+   ECORE_DRM2_MODE_ASPECT_NONE = 0,
+   ECORE_DRM2_MODE_ASPECT_4_3 = 1,
+   ECORE_DRM2_MODE_ASPECT_16_9 = 2,
+   ECORE_DRM2_MODE_ASPECT_64_27 = 3,
+   ECORE_DRM2_MODE_ASPECT_256_135 = 4,
+} Ecore_Drm2_Aspect_Ratio;
+
 /* opaque structure to represent a drm framebuffer */
 typedef struct _Ecore_Drm2_Fb Ecore_Drm2_Fb;
 
diff --git a/src/lib/ecore_drm2/ecore_drm2_displays.c b/src/lib/ecore_drm2/ecore_drm2_displays.c
index 4b257eed81..d7b3a2f7de 100644
--- a/src/lib/ecore_drm2/ecore_drm2_displays.c
+++ b/src/lib/ecore_drm2/ecore_drm2_displays.c
@@ -268,6 +268,7 @@ _ecore_drm2_display_mode_create(const drmModeModeInfo *info)
    mode->flags = 0;
    mode->width = info->hdisplay;
    mode->height = info->vdisplay;
+   mode->aspect_ratio = info->flags;
 
    refresh = (info->clock * 1000000LL / info->htotal +
               info->vtotal / 2) / info->vtotal;
diff --git a/src/lib/ecore_drm2/ecore_drm2_private.h b/src/lib/ecore_drm2/ecore_drm2_private.h
index c52c0424c3..9f50e27ea8 100644
--- a/src/lib/ecore_drm2/ecore_drm2_private.h
+++ b/src/lib/ecore_drm2/ecore_drm2_private.h
@@ -251,6 +251,7 @@ struct _Ecore_Drm2_Display_Mode
    uint32_t id;
    uint32_t flags, refresh;
    int32_t width, height;
+   uint32_t aspect_ratio;
    drmModeModeInfo info;
 };
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to