Commit e0e73f09 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

screen: fix mouse file location

parent 388b0b93
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_plugin.h> #include <vlc_plugin.h>
#include <vlc_modules.h> /* module_need for "video blending" */ #include <vlc_modules.h> /* module_need for "video blending" */
#include <vlc_url.h>
#include "screen.h" #include "screen.h"
/***************************************************************************** /*****************************************************************************
...@@ -209,13 +210,14 @@ static int Open( vlc_object_t *p_this ) ...@@ -209,13 +210,14 @@ static int Open( vlc_object_t *p_this )
#endif #endif
#ifdef SCREEN_MOUSE #ifdef SCREEN_MOUSE
char * psz_mouse = var_CreateGetNonEmptyString( p_demux, char *mousefile = var_InheritString( p_demux, "screen-mouse-image" );
"screen-mouse-image" ); char *mouseurl = mousefile ? vlc_path2uri( mousefile, NULL ) : NULL;
if( psz_mouse ) free( mousefile );
if( mouseurl )
{ {
image_handler_t *p_image; image_handler_t *p_image;
video_format_t fmt_in, fmt_out; video_format_t fmt_in, fmt_out;
msg_Dbg( p_demux, "Using %s for the mouse pointer image", psz_mouse ); msg_Dbg( p_demux, "Using %s for the mouse pointer image", mouseurl );
memset( &fmt_in, 0, sizeof( fmt_in ) ); memset( &fmt_in, 0, sizeof( fmt_in ) );
memset( &fmt_out, 0, sizeof( fmt_out ) ); memset( &fmt_out, 0, sizeof( fmt_out ) );
fmt_out.i_chroma = VLC_CODEC_RGBA; fmt_out.i_chroma = VLC_CODEC_RGBA;
...@@ -223,13 +225,13 @@ static int Open( vlc_object_t *p_this ) ...@@ -223,13 +225,13 @@ static int Open( vlc_object_t *p_this )
if( p_image ) if( p_image )
{ {
p_sys->p_mouse = p_sys->p_mouse =
image_ReadUrl( p_image, psz_mouse, &fmt_in, &fmt_out ); image_ReadUrl( p_image, mouseurl, &fmt_in, &fmt_out );
image_HandlerDelete( p_image ); image_HandlerDelete( p_image );
} }
if( !p_sys->p_mouse ) if( !p_sys->p_mouse )
msg_Err( p_demux, "Failed to open mouse pointer image (%s)", msg_Err( p_demux, "Failed to open mouse pointer image (%s)",
psz_mouse ); mouseurl );
free( psz_mouse ); free( mouseurl );
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment