mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-15 17:47:09 +00:00
convert xmms2_barval to double
This commit is contained in:
parent
202bbf01ff
commit
e2e7c47c48
@ -1340,7 +1340,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
||||
obj->callbacks.print = &print_xmms2_percent;
|
||||
obj->callbacks.free = &free_xmms2;
|
||||
END OBJ(xmms2_bar, &update_xmms2)
|
||||
scan_bar(obj, arg, 255);
|
||||
scan_bar(obj, arg, 1);
|
||||
obj->callbacks.barval = &xmms2_barval;
|
||||
obj->callbacks.free = &free_xmms2;
|
||||
END OBJ(xmms2_smart, &update_xmms2)
|
||||
|
@ -359,11 +359,11 @@ void print_xmms2_duration(struct text_object *obj, char *p, int p_max_size)
|
||||
(info.xmms2.duration / 1000) % 60);
|
||||
}
|
||||
|
||||
uint8_t xmms2_barval(struct text_object *obj)
|
||||
double xmms2_barval(struct text_object *obj)
|
||||
{
|
||||
(void)obj;
|
||||
|
||||
return round_to_int(info.xmms2.progress * 255.0f);
|
||||
return info.xmms2.progress;
|
||||
}
|
||||
|
||||
void print_xmms2_smart(struct text_object *obj, char *p, int p_max_size)
|
||||
|
@ -58,7 +58,7 @@ void update_xmms2(void);
|
||||
void print_xmms2_tracknr(struct text_object *, char *, int);
|
||||
void print_xmms2_elapsed(struct text_object *, char *, int);
|
||||
void print_xmms2_duration(struct text_object *, char *, int);
|
||||
uint8_t xmms2_barval(struct text_object *);
|
||||
double xmms2_barval(struct text_object *);
|
||||
void print_xmms2_smart(struct text_object *, char *, int);
|
||||
void print_xmms2_artist(struct text_object *, char *, int);
|
||||
void print_xmms2_album(struct text_object *, char *, int);
|
||||
|
Loading…
Reference in New Issue
Block a user