ecore_drm2: Add API function to get preferred depth
This commit is contained in:
parent
94cdf5d9f2
commit
aaa694e551
|
@ -40,6 +40,7 @@ EAPI int ecore_drm2_shutdown(void);
|
||||||
EAPI Ecore_Drm2_Device *ecore_drm2_device_open(const char *seat, unsigned int tty);
|
EAPI Ecore_Drm2_Device *ecore_drm2_device_open(const char *seat, unsigned int tty);
|
||||||
EAPI void ecore_drm2_device_close(Ecore_Drm2_Device *dev);
|
EAPI void ecore_drm2_device_close(Ecore_Drm2_Device *dev);
|
||||||
EAPI void ecore_drm2_device_cursor_size_get(Ecore_Drm2_Device *dev, int *width, int *height);
|
EAPI void ecore_drm2_device_cursor_size_get(Ecore_Drm2_Device *dev, int *width, int *height);
|
||||||
|
EAPI void ecore_drm2_device_preferred_depth_get(Ecore_Drm2_Device *dev, int *depth, int *bpp);
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
|
@ -233,3 +233,19 @@ ecore_drm2_device_cursor_size_get(Ecore_Drm2_Device *dev, int *width, int *heigh
|
||||||
if (ret == 0) *height = caps;
|
if (ret == 0) *height = caps;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_drm2_device_preferred_depth_get(Ecore_Drm2_Device *dev, int *depth, int *bpp)
|
||||||
|
{
|
||||||
|
uint64_t caps;
|
||||||
|
int ret = -1;
|
||||||
|
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN(dev);
|
||||||
|
|
||||||
|
ret = sym_drmGetCap(dev->fd, DRM_CAP_DUMB_PREFERRED_DEPTH, &caps);
|
||||||
|
if (ret == 0)
|
||||||
|
{
|
||||||
|
if (depth) *depth = caps;
|
||||||
|
if (bpp) *bpp = caps;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue