Move memsetting of fds and evctx to drm_common.c

This commit is contained in:
twinaphex 2015-11-26 18:59:36 +01:00
parent 00cf57eac0
commit 7c52d380bf
3 changed files with 3 additions and 6 deletions

View File

@ -174,6 +174,9 @@ void drm_free(void)
if (g_drm_resources)
drmModeFreeResources(g_drm_resources);
memset(&g_drm_fds, 0, sizeof(struct pollfd));
memset(&g_drm_evctx, 0, sizeof(drmEventContext));
g_drm_encoder = NULL;
g_drm_connector = NULL;
g_drm_resources = NULL;

View File

@ -595,9 +595,6 @@ fail:
/* Counterpart to exynos_open. */
static void exynos_close(struct exynos_data *pdata)
{
memset(&g_drm_fds, 0, sizeof(struct pollfd));
memset(&g_drm_evctx, 0, sizeof(drmEventContext));
memset(pdata->drmname, 0, sizeof(char) * 32);
drm_free();

View File

@ -291,9 +291,6 @@ static void free_drm_resources(gfx_ctx_drm_egl_data_t *drm)
drm_free();
memset(&g_drm_fds, 0, sizeof(struct pollfd));
memset(&g_drm_evctx, 0, sizeof(drmEventContext));
if (g_drm_fd >= 0)
retro_fclose(drm->g_drm);