forked from enlightenment/efl
ecore-drm: Add API function for getting size of an output.
@feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
c5c378f5f9
commit
bba98a515c
|
@ -157,6 +157,7 @@ EAPI void ecore_drm_output_cursor_size_set(Ecore_Drm_Output *output, int handle,
|
|||
EAPI Eina_Bool ecore_drm_output_enable(Ecore_Drm_Output *output);
|
||||
EAPI void ecore_drm_output_fb_release(Ecore_Drm_Output *output, Ecore_Drm_Fb *fb);
|
||||
EAPI void ecore_drm_output_repaint(Ecore_Drm_Output *output);
|
||||
EAPI void ecore_drm_output_size_get(Ecore_Drm_Device *dev, int output, int *w, int *h);
|
||||
|
||||
EAPI Eina_Bool ecore_drm_inputs_create(Ecore_Drm_Device *dev);
|
||||
EAPI void ecore_drm_inputs_destroy(Ecore_Drm_Device *dev);
|
||||
|
|
|
@ -703,3 +703,18 @@ err:
|
|||
output->next = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_drm_output_size_get(Ecore_Drm_Device *dev, int output, int *w, int *h)
|
||||
{
|
||||
drmModeFB *fb;
|
||||
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
if (!dev) return;
|
||||
|
||||
if (!(fb = drmModeGetFB(dev->drm.fd, output))) return;
|
||||
if (w) *w = fb->width;
|
||||
if (h) *h = fb->height;
|
||||
drmModeFreeFB(fb);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue