Search
lxdream.org :: lxdream/src/drivers/video_gtk.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_gtk.c
changeset 370:3131ba1440fc
prev352:f0df7a6d4703
next424:421d68e78c46
author nkeynes
date Sat Sep 08 04:05:35 2007 +0000 (12 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_gtk.c Sun Feb 11 10:09:32 2007 +0000
1.2 +++ b/src/drivers/video_gtk.c Sat Sep 08 04:05:35 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: video_gtk.c,v 1.10 2007-02-11 10:09:32 nkeynes Exp $
1.6 + * $Id: video_gtk.c,v 1.11 2007-09-08 04:05:35 nkeynes Exp $
1.7 *
1.8 * The PC side of the video support (responsible for actually displaying /
1.9 * rendering frames)
1.10 @@ -34,7 +34,7 @@
1.11 void video_gtk_shutdown();
1.12 uint16_t video_gtk_resolve_keysym( const gchar *keysym );
1.13
1.14 -struct display_driver display_gtk_driver = { "gtk", video_gtk_init, NULL,
1.15 +struct display_driver display_gtk_driver = { "gtk", video_gtk_init, video_gtk_shutdown,
1.16 video_gtk_resolve_keysym,
1.17 NULL, NULL, NULL, NULL, NULL, NULL, NULL };
1.18
1.19 @@ -84,16 +84,16 @@
1.20
1.21 gtk_window_set_default_size( video_win, video_width, video_height );
1.22
1.23 - video_glx_init( gdk_x11_display_get_xdisplay( gtk_widget_get_display(GTK_WIDGET(video_win))),
1.24 + return video_glx_init( gdk_x11_display_get_xdisplay( gtk_widget_get_display(GTK_WIDGET(video_win))),
1.25 gdk_x11_screen_get_xscreen( gtk_widget_get_screen(GTK_WIDGET(video_win))),
1.26 GDK_WINDOW_XWINDOW( GTK_WIDGET(video_win)->window ),
1.27 video_width, video_height, &display_gtk_driver );
1.28 - return TRUE;
1.29 }
1.30
1.31 void video_gtk_shutdown()
1.32 {
1.33 -
1.34 + video_glx_shutdown();
1.35 + gtk_widget_destroy( GTK_WIDGET(video_win) );
1.36
1.37 }
1.38
.