bool color;
bool exit;
+ /* rgb values for the color yellow */
+ short yellow_r;
+ short yellow_g;
+ short yellow_b;
+
int box_type;
int box_y; // start of box content
int box_height;
static void start_color_and_pairs(intf_thread_t *intf)
{
+ intf_sys_t *sys = intf->p_sys;
+
if (!has_colors()) {
- intf->p_sys->color = false;
+ sys->color = false;
msg_Warn(intf, "Terminal doesn't support colors");
return;
}
init_pair(i, color_pairs[i].f, color_pairs[i].b);
/* untested, in all my terminals, !can_change_color() --funman */
- if (can_change_color())
+ if (can_change_color()) {
+ color_content(COLOR_YELLOW, &sys->yellow_r, &sys->yellow_g, &sys->yellow_b);
init_color(COLOR_YELLOW, 960, 500, 0); /* YELLOW -> ORANGE */
+ }
}
static void DrawBox(int y, int h, bool color, const char *title)
{
intf_thread_t *intf = (intf_thread_t *)p_this;
intf_sys_t *sys = intf->p_sys = calloc(1, sizeof(intf_sys_t));
- playlist_t *p_playlist = pl_Get(p_this);
+ playlist_t *p_playlist = pl_Get(intf);
if (!sys)
return VLC_ENOMEM;
if (sys->p_input)
vlc_object_release(sys->p_input);
+ if (can_change_color())
+ /* Restore yellow to its original color */
+ init_color(COLOR_YELLOW, sys->yellow_r, sys->yellow_g, sys->yellow_b);
+
endwin(); /* Close the ncurses interface */
vlc_LogSet(p_this->p_libvlc, NULL, NULL);