Search
lxdream.org :: lxdream/src/display.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/display.c
changeset 370:3131ba1440fc
prev356:b281cad966b7
next425:17f019f4ed8d
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/display.c Tue Feb 13 08:28:50 2007 +0000
1.2 +++ b/src/display.c Sat Sep 08 04:05:35 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: display.c,v 1.7 2007-02-13 08:28:50 nkeynes Exp $
1.6 + * $Id: display.c,v 1.8 2007-09-08 04:05:35 nkeynes Exp $
1.7 *
1.8 * Generic support for keyboard and other input sources. The active display
1.9 * driver is expected to deliver events here, where they're translated and
1.10 @@ -144,13 +144,17 @@
1.11
1.12
1.13
1.14 -void display_set_driver( display_driver_t driver )
1.15 +gboolean display_set_driver( display_driver_t driver )
1.16 {
1.17 - if( display_driver != NULL && display_driver->shutdown_driver != NULL )
1.18 + gboolean rv = TRUE;
1.19 + if( display_driver != NULL && display_driver->shutdown_driver != NULL )
1.20 display_driver->shutdown_driver();
1.21
1.22 display_driver = driver;
1.23 if( driver->init_driver != NULL )
1.24 - driver->init_driver();
1.25 - texcache_gl_init();
1.26 + rv = driver->init_driver();
1.27 + if( rv ) {
1.28 + texcache_gl_init();
1.29 + }
1.30 + return rv;
1.31 }
.