mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-14 03:23:29 +00:00
convert mpd_barval to double
This commit is contained in:
parent
9e587ae6d5
commit
202bbf01ff
@ -1243,7 +1243,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
||||
obj->callbacks.print = &print_mpd_status;
|
||||
obj->callbacks.free = &free_mpd;
|
||||
END OBJ(mpd_bar, &update_mpd)
|
||||
scan_bar(obj, arg, 255);
|
||||
scan_bar(obj, arg, 1);
|
||||
init_mpd();
|
||||
obj->callbacks.barval = &mpd_barval;
|
||||
obj->callbacks.free = &free_mpd;
|
||||
|
@ -378,10 +378,10 @@ uint8_t mpd_percentage(struct text_object *obj)
|
||||
return round_to_int(mpd_info.progress * 100.0f);
|
||||
}
|
||||
|
||||
uint8_t mpd_barval(struct text_object *obj)
|
||||
double mpd_barval(struct text_object *obj)
|
||||
{
|
||||
(void)obj;
|
||||
return round_to_int(mpd_info.progress * 255.0f);
|
||||
return mpd_info.progress;
|
||||
}
|
||||
|
||||
void print_mpd_smart(struct text_object *obj, char *p, int p_max_size)
|
||||
|
@ -17,7 +17,7 @@ void update_mpd(void);
|
||||
void print_mpd_elapsed(struct text_object *, char *, int);
|
||||
void print_mpd_length(struct text_object *, char *, int);
|
||||
uint8_t mpd_percentage(struct text_object *);
|
||||
uint8_t mpd_barval(struct text_object *);
|
||||
double mpd_barval(struct text_object *);
|
||||
void print_mpd_smart(struct text_object *, char *, int);
|
||||
void print_mpd_title(struct text_object *, char *, int);
|
||||
void print_mpd_artist(struct text_object *, char *, int);
|
||||
|
Loading…
Reference in New Issue
Block a user