+ /* Create and initialize system-dependant method - this function issues its
+ * own error messages */
+ if( p_vout->pf_create( p_vout ) )
+ {
+ /* If pf_create has failed then we have to make sure
+ * pf_destroy won't be called, because the plugin should have
+ * cleaned up all its mess */
+ p_vout->pf_destroy = NULL;
+ return( 1 );
+ }
+
+ intf_WarnMsg( 1, "vout: video display initialized (%dx%d, %d/%d bpp)",
+ p_vout->i_width, p_vout->i_height, p_vout->i_screen_depth,
+ p_vout->i_bytes_per_pixel * 8 );
+
+ intf_WarnMsg( 3, "vout info: got %dx%d, %d/%d bpp (%d Bpl), "
+ "masks: 0x%x/0x%x/0x%x",
+ p_vout->i_width, p_vout->i_height, p_vout->i_screen_depth,
+ p_vout->i_bytes_per_pixel * 8, p_vout->i_bytes_per_line,
+ p_vout->i_red_mask, p_vout->i_green_mask,
+ p_vout->i_blue_mask );
+
+ /* Calculate shifts from system-updated masks */
+ MaskToShift( &p_vout->i_red_lshift, &p_vout->i_red_rshift,
+ p_vout->i_red_mask );
+ MaskToShift( &p_vout->i_green_lshift, &p_vout->i_green_rshift,
+ p_vout->i_green_mask );
+ MaskToShift( &p_vout->i_blue_lshift, &p_vout->i_blue_rshift,
+ p_vout->i_blue_mask );
+
+ /* Set some useful colors */
+ p_vout->i_white_pixel = RGB2PIXEL( p_vout, 255, 255, 255 );
+ p_vout->i_black_pixel = RGB2PIXEL( p_vout, 0, 0, 0 );
+ p_vout->i_gray_pixel = RGB2PIXEL( p_vout, 128, 128, 128 );
+ p_vout->i_blue_pixel = RGB2PIXEL( p_vout, 0, 0, 50 );
+
+ /* Load fonts - fonts must be initialized after the system method since
+ * they may be dependant on screen depth and other thread properties */
+ p_vout->p_default_font = vout_LoadFont( VOUT_DEFAULT_FONT );
+ if( p_vout->p_default_font == NULL )
+ {
+ intf_ErrMsg( "vout error: could not load default font" );
+ }
+
+ p_vout->p_large_font = vout_LoadFont( VOUT_LARGE_FONT );
+ if( p_vout->p_large_font == NULL )
+ {
+ intf_ErrMsg( "vout error: could not load large font" );
+ }
+
+ /* Initialize output method. This function issues its own error messages */