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

display: remove title from configuration

parent eaecbe60
......@@ -73,9 +73,6 @@ typedef struct {
/* Display properties */
struct {
/* Window title (may be NULL) */
const char *title;
/* Display size */
unsigned width;
unsigned height;
......
......@@ -461,12 +461,10 @@ static int Open(vlc_object_t *object)
goto error;
}
if (vd->cfg->display.title)
caca_set_display_title(sys->dp,
vd->cfg->display.title);
else
caca_set_display_title(sys->dp,
VOUT_TITLE "(Colour AsCii Art)");
char *title = var_InheritString(vd, "video-title");
caca_set_display_title(sys->dp,
(title != NULL) ? title : VOUT_TITLE "(Colour AsCii Art)");
free(title);
block_fifo_t *fifo = block_FifoNew();
if (likely(fifo != NULL)) {
......
......@@ -500,7 +500,6 @@ static int OpenDisplay( vout_display_t *vd, video_format_t *fmt )
bool b_hw_accel = 0;
FOURCC i_kva_fourcc;
int i_chroma_shift;
char sz_title[ 256 ];
RECTL rcl;
int w, h;
......@@ -633,16 +632,15 @@ static int OpenDisplay( vout_display_t *vd, video_format_t *fmt )
return VLC_ENOMEM;
}
if (vd->cfg->display.title)
snprintf( sz_title, sizeof( sz_title ), "%s", vd->cfg->display.title );
else
snprintf( sz_title, sizeof( sz_title ),
"%s (%4.4s to %4.4s - %s mode KVA output)",
VOUT_TITLE,
( char * )&vd->fmt.i_chroma,
( char * )&sys->kvas.fccSrcColor,
psz_video_mode[ sys->kvac.ulMode - 1 ]);
WinSetWindowText( sys->frame, sz_title );
char *title = var_InheritString( vd, "video-title" );
if (title != NULL
|| asprintf( &title, VOUT_TITLE " (%4.4s to %4.4s - %s mode KVA output)",
(char *)&vd->fmt.i_chroma, (char *)&sys->kvas.fccSrcColor,
psz_video_mode[sys->kvac.ulMode - 1] ) >= 0)
{
WinSetWindowText( sys->frame, title );
free( title );
}
sys->cursor_timeout = var_InheritInteger( vd, "mouse-hide-timeout" )
* (CLOCK_FREQ / 1000);
......
......@@ -577,7 +577,7 @@ void vout_ControlChangeViewpoint(vout_thread_t *vout,
}
/* */
static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg, const char *title)
static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg)
{
/* Load configuration */
cfg->window = vout->p->window;
......@@ -587,7 +587,6 @@ static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg, cons
#endif
cfg->viewpoint = vout->p->original.pose;
cfg->display.title = title;
const int display_width = var_GetInteger(vout, "width");
const int display_height = var_GetInteger(vout, "height");
cfg->display.width = display_width > 0 ? display_width : 0;
......@@ -1492,7 +1491,7 @@ static int ThreadStart(vout_thread_t *vout, vout_display_state_t *state)
vout_display_state_t state_default;
if (!state) {
VoutGetDisplayCfg(vout, &state_default.cfg, vout->p->display.title);
VoutGetDisplayCfg(vout, &state_default.cfg);
#if defined(_WIN32) || defined(__OS2__)
bool below = var_InheritBool(vout, "video-wallpaper");
......
......@@ -88,7 +88,6 @@ struct vout_thread_sys_t
/* */
struct {
char *title;
vout_display_t *vd;
bool use_dr;
} display;
......
......@@ -53,9 +53,6 @@ int vout_OpenWrapper(vout_thread_t *vout,
vout_thread_sys_t *sys = vout->p;
msg_Dbg(vout, "Opening vout display wrapper");
/* */
sys->display.title = var_InheritString(vout, "video-title");
/* */
char *modlist = var_InheritString(vout, "vout");
......@@ -65,10 +62,8 @@ int vout_OpenWrapper(vout_thread_t *vout,
sys->display.vd = vout_NewDisplay(vout, &vout->p->original, state, modlist);
free(modlist);
if (!sys->display.vd) {
free(sys->display.title);
if (!sys->display.vd)
return VLC_EGENERIC;
}
/* */
#ifdef _WIN32
......@@ -95,7 +90,6 @@ void vout_CloseWrapper(vout_thread_t *vout, vout_display_state_t *state)
sys->decoder_pool = NULL; /* FIXME remove */
vout_DeleteDisplay(sys->display.vd, state);
free(sys->display.title);
}
/*****************************************************************************
......
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