summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-11 09:42:42 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-27 11:57:53 -0400
commite934f546ad10e6aed599d7f4968e8c19871bfcd2 (patch)
treee7464caebf54e8cdd48be0847fe7386b79f431c7
parentf3b767255154454fe43c5d40f3d9b3b7a97b96c0 (diff)
downloadefl-e934f546ad10e6aed599d7f4968e8c19871bfcd2.tar.gz
ecore-drm2: Add API function to get screen size range
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
-rw-r--r--src/lib/ecore_drm2/Ecore_Drm2.h14
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_device.c16
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c4
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 3d3c7d0e91..4872793b17 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 550d6e3afb..ec180adade 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 1b9313f000..81e0018047 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" : "");