mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
parent
85ae4cca37
commit
db53cf9245
4 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
|
@ -44,7 +45,7 @@ content(struct module *mod)
|
|||
struct private *m = mod->private;
|
||||
|
||||
int percent = m->vol_max - m->vol_min > 0
|
||||
? 100 * m->vol_cur / (m->vol_max - m->vol_min)
|
||||
? round(100. * m->vol_cur / (m->vol_max - m->vol_min))
|
||||
: 0;
|
||||
|
||||
mtx_lock(&mod->lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue