Commit e311921b authored by Rafaël Carré's avatar Rafaël Carré

ncurses: remove variable from interface context

parent 2ae4d9eb
...@@ -193,8 +193,6 @@ struct intf_sys_t ...@@ -193,8 +193,6 @@ struct intf_sys_t
playlist_item_t *p_node; /* current node */ playlist_item_t *p_node; /* current node */
int b_box_cleared;
// msg_subscription_t* p_sub; /* message bank subscription */ // msg_subscription_t* p_sub; /* message bank subscription */
char psz_search_chain[20]; char psz_search_chain[20];
...@@ -2030,6 +2028,7 @@ static void Run(intf_thread_t *p_intf) ...@@ -2030,6 +2028,7 @@ static void Run(intf_thread_t *p_intf)
{ {
intf_sys_t *p_sys = p_intf->p_sys; intf_sys_t *p_sys = p_intf->p_sys;
playlist_t *p_playlist = pl_Get(p_intf); playlist_t *p_playlist = pl_Get(p_intf);
bool force_redraw = false;
time_t t_last_refresh; time_t t_last_refresh;
int canc = vlc_savecancel(); int canc = vlc_savecancel();
...@@ -2046,13 +2045,15 @@ static void Run(intf_thread_t *p_intf) ...@@ -2046,13 +2045,15 @@ static void Run(intf_thread_t *p_intf)
/* Update the input */ /* Update the input */
if (!p_sys->p_input) if (!p_sys->p_input)
{
p_sys->p_input = playlist_CurrentInput(p_playlist); p_sys->p_input = playlist_CurrentInput(p_playlist);
force_redraw = true;
}
else if (p_sys->p_input->b_dead) else if (p_sys->p_input->b_dead)
{ {
vlc_object_release(p_sys->p_input); vlc_object_release(p_sys->p_input);
p_sys->p_input = NULL; p_sys->p_input = NULL;
p_sys->f_slider = p_sys->f_slider_old = 0.0; p_sys->f_slider = p_sys->f_slider_old = 0.0;
p_sys->b_box_cleared = false;
} }
PL_LOCK; PL_LOCK;
...@@ -2064,12 +2065,11 @@ static void Run(intf_thread_t *p_intf) ...@@ -2064,12 +2065,11 @@ static void Run(intf_thread_t *p_intf)
while (HandleKey(p_intf)) while (HandleKey(p_intf))
Redraw(p_intf, &t_last_refresh); Redraw(p_intf, &t_last_refresh);
/* Hack */ if (force_redraw)
if (p_sys->f_slider > 0.0001 && !p_sys->b_box_cleared)
{ {
clear(); clear();
Redraw(p_intf, &t_last_refresh); Redraw(p_intf, &t_last_refresh);
p_sys->b_box_cleared = true; force_redraw = false;
} }
if ((time(0) - t_last_refresh) >= 1) if ((time(0) - t_last_refresh) >= 1)
......
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