diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-02-13 15:20:39 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-02-13 15:22:37 +0100 |
commit | d8758581671fb8289c5836b8b58424815ed493b6 (patch) | |
tree | 67db4e2f2f650bf0b38d3639481bdfaf029ec899 | |
parent | 3876a7f9e6ab2c04f6c67a4efaa8b4ee92b372bb (diff) |
eglglessink: Close the dispman display on RPi after usage
-rw-r--r-- | ext/eglgles/video_platform_wrapper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/eglgles/video_platform_wrapper.c b/ext/eglgles/video_platform_wrapper.c index 1a95cf355..d9e799fe4 100644 --- a/ext/eglgles/video_platform_wrapper.c +++ b/ext/eglgles/video_platform_wrapper.c @@ -673,6 +673,7 @@ platform_free_eglimage (EGLDisplay display, EGLContext context, GLuint tex_id, typedef struct { EGL_DISPMANX_WINDOW_T w; + DISPMANX_DISPLAY_HANDLE_T d; } RPIWindowData; EGLNativeWindowType @@ -715,6 +716,7 @@ platform_create_native_window (gint width, gint height, gpointer * window_data) DISPMANX_PROTECTION_NONE, 0, 0, 0); *window_data = data = g_slice_new0 (RPIWindowData); + data->d = dispman_display; data->w.element = dispman_element; data->w.width = width; data->w.height = height; @@ -731,10 +733,11 @@ platform_destroy_native_window (EGLNativeDisplayType display, DISPMANX_UPDATE_HANDLE_T dispman_update; RPIWindowData *data = *window_data; - dispman_display = vc_dispmanx_display_open (0); + dispman_display = data->d; dispman_update = vc_dispmanx_update_start (0); vc_dispmanx_element_remove (dispman_update, data->w.element); vc_dispmanx_update_submit_sync (dispman_update); + vc_dispmanx_display_close (dispman_display); g_slice_free (RPIWindowData, data); *window_data = NULL; |