/**
* Shutdown the Ecore_Drm library.
- *
+ *
* @return The number of times the library has been initialized without
* being shutdown. 0 is returned if an error occurs.
- *
+ *
* @ingroup Ecore_Drm_Init_Group
*/
-EAPI int
+EAPI int
ecore_drm_shutdown(void)
{
+ Eina_List *lists;
+ Ecore_Drm_Device *dev;
+
/* _ecore_drm_init_count should not go below zero. */
if (_ecore_drm_init_count < 1)
{
/* if we are still in use, decrement init count and get out */
if (--_ecore_drm_init_count != 0) return _ecore_drm_init_count;
+ /* free the list of devices */
+ lists = eina_list_clone(ecore_drm_devices_get());
+ EINA_LIST_FREE(lists, dev)
+ {
+ ecore_drm_device_free(dev);
+ }
+
_ecore_drm_inputs_shutdown();
/* close eeze */
if (dev->dumb[i]) ecore_drm_fb_destroy(dev->dumb[i]);
dev->dumb[i] = NULL;
}
-
+ /* destroy all sprites*/
+ ecore_drm_sprites_destroy(dev);
+ /* clear inputs */
ecore_drm_inputs_destroy(dev);
-
/* free outputs */
EINA_LIST_FREE(dev->outputs, output)
ecore_drm_output_free(output);
+ /* disconnect launcher */
+ ecore_drm_launcher_disconnect(dev);
+ /* close myself */
+ ecore_drm_device_close(dev);
+
/* free crtcs */
if (dev->crtcs) free(dev->crtcs);