Fix char cast compiler warning and print more descriptive error message when loading of pixmap fails.

This commit is contained in:
jdolan 2013-07-07 09:11:42 -04:00
parent e485edc236
commit 2bd349d6c6

View file

@ -671,10 +671,9 @@ void load_pixmap( const char* filename, GtkWidget* widget, GdkPixmap **gdkpixmap
bmp_to_pixmap( str.GetBuffer(), gdkpixmap, mask );
if ( *gdkpixmap == NULL ) {
printf( "gdkpixmap was null\n" );
gchar *dummy[] = { "1 1 1 1", " c None", " " };
printf( "calling gdk_pixmap_create_from_xpm_d\n" );
*gdkpixmap = gdk_pixmap_create_from_xpm_d( gdk_get_default_root_window(), mask, NULL, dummy );
Sys_Printf( "Failed to load_pixmap %s, creating default pixmap\n", str.GetBuffer() );
const gchar *dummy[] = { "1 1 1 1", " c None", " " };
*gdkpixmap = gdk_pixmap_create_from_xpm_d( gdk_get_default_root_window(), mask, NULL, (gchar **)dummy );
}
}