Search
lxdream.org :: lxdream/src/drivers/video_x11.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_x11.c
changeset 370:3131ba1440fc
prev352:f0df7a6d4703
next405:570d93abb5b7
author nkeynes
date Sat Sep 08 04:05:35 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Handle video driver init failure cleanly (fallback to headless)
Hookup shutdown for the GTK driver
file annotate diff log raw
1.1 --- a/src/drivers/video_x11.c Sun Feb 11 10:09:32 2007 +0000
1.2 +++ b/src/drivers/video_x11.c Sat Sep 08 04:05:35 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: video_x11.c,v 1.12 2007-02-11 10:09:32 nkeynes Exp $
1.6 + * $Id: video_x11.c,v 1.13 2007-09-08 04:05:35 nkeynes Exp $
1.7 *
1.8 * Shared functions for all X11-based display drivers.
1.9 *
1.10 @@ -135,11 +135,18 @@
1.11 }
1.12 return TRUE;
1.13 }
1.14 +
1.15 void video_glx_shutdown()
1.16 {
1.17 - XDestroyWindow( video_x11_display, glx_window );
1.18 - XFreeColormap( video_x11_display, win_attrs.colormap );
1.19 - glXDestroyContext( video_x11_display, glx_context );
1.20 + if( glx_window != None ) {
1.21 + XDestroyWindow( video_x11_display, glx_window );
1.22 + XFreeColormap( video_x11_display, win_attrs.colormap );
1.23 + glx_window = None;
1.24 + }
1.25 + if( glx_context != NULL ) {
1.26 + glXDestroyContext( video_x11_display, glx_context );
1.27 + glx_context = NULL;
1.28 + }
1.29 }
1.30
1.31
.