devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e934f546ad10e6aed599d7f4968e8c19871bfcd2

commit e934f546ad10e6aed599d7f4968e8c19871bfcd2
Author: Chris Michael <[email protected]>
Date:   Wed May 11 09:42:42 2016 -0400

    ecore-drm2: Add API function to get screen size range
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_drm2/Ecore_Drm2.h         | 14 ++++++++++++++
 src/lib/ecore_drm2/ecore_drm2_device.c  | 16 ++++++++++++++++
 src/lib/ecore_drm2/ecore_drm2_outputs.c |  4 ++--
 3 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 3d3c7d0..4872793 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -242,6 +242,20 @@ EAPI void 
ecore_drm2_device_pointer_max_set(Ecore_Drm2_Device *device, int w, in
 EAPI unsigned int *ecore_drm2_device_crtcs_get(Ecore_Drm2_Device *device, int 
*num);
 
 /**
+ * Get the minimum and maximum screen size range
+ *
+ * @param device
+ * @param *minw
+ * @param *minh
+ * @param *maxw
+ * @param *maxh
+ *
+ * @ingroup Ecore_Drm2_Device_Group
+ * @since 1.18
+ */
+EAPI void ecore_drm2_device_screen_size_range_get(Ecore_Drm2_Device *device, 
int *minw, int *minh, int *maxw, int *maxh);
+
+/**
  * @defgroup Ecore_Drm2_Output_Group Drm output functions
  *
  * Functions that deal with setup of outputs
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c 
b/src/lib/ecore_drm2/ecore_drm2_device.c
index 550d6e3..ec180ad 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -268,3 +268,19 @@ ecore_drm2_device_crtcs_get(Ecore_Drm2_Device *device, int 
*num)
    if (num) *num = device->num_crtcs;
    return device->crtcs;
 }
+
+EAPI void
+ecore_drm2_device_screen_size_range_get(Ecore_Drm2_Device *device, int *minw, 
int *minh, int *maxw, int *maxh)
+{
+   if (minw) *minw = 0;
+   if (minh) *minh = 0;
+   if (maxw) *maxw = 0;
+   if (maxh) *maxh = 0;
+
+   EINA_SAFETY_ON_NULL_RETURN(device);
+
+   if (minw) *minw = device->min.width;
+   if (minh) *minh = device->min.height;
+   if (maxw) *maxw = device->max.width;
+   if (maxh) *maxh = device->max.height;
+}
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c 
b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 1b9313f..81e0018 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -58,8 +58,8 @@ _output_debug(Ecore_Drm2_Output *output, const 
drmModeConnector *conn)
 
    EINA_LIST_FOREACH(output->modes, l, omode)
      {
-        DBG("\tAdded Mode: %dx%d@%.1f%s%s%s",
-            omode->width, omode->height, (omode->refresh / 1000.0),
+        DBG("\tAdded Mode: %dx%d@%d%s%s%s",
+            omode->width, omode->height, omode->refresh,
             (omode->flags & DRM_MODE_TYPE_PREFERRED) ? ", preferred" : "",
             (omode->flags & DRM_MODE_TYPE_DEFAULT) ? ", current" : "",
             (conn->count_modes == 0) ? ", built-in" : "");

-- 


Reply via email to