mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 03:55:41 +01:00
alsamixer: Fix 64bit issues
lrint() returns a long int. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
ac2be7b33a
commit
3bea722b3b
1 changed files with 3 additions and 3 deletions
|
@ -486,17 +486,17 @@ static void display_control(unsigned int control_index)
|
||||||
if (control->flags & IS_ACTIVE)
|
if (control->flags & IS_ACTIVE)
|
||||||
wattrset(mixer_widget.window, attr_mixer_active);
|
wattrset(mixer_widget.window, attr_mixer_active);
|
||||||
if (!(control->flags & HAS_VOLUME_1)) {
|
if (!(control->flags & HAS_VOLUME_1)) {
|
||||||
sprintf(buf, "%d", lrint(volumes[0] * 100));
|
sprintf(buf, "%d", (int)lrint(volumes[0] * 100));
|
||||||
display_string_in_field(values_y, frame_left - 2, buf, 8, ALIGN_CENTER);
|
display_string_in_field(values_y, frame_left - 2, buf, 8, ALIGN_CENTER);
|
||||||
} else {
|
} else {
|
||||||
mvwprintw(mixer_widget.window, values_y, frame_left - 2,
|
mvwprintw(mixer_widget.window, values_y, frame_left - 2,
|
||||||
"%3d", lrint(volumes[0] * 100));
|
"%3d", (int)lrint(volumes[0] * 100));
|
||||||
if (control->flags & IS_ACTIVE)
|
if (control->flags & IS_ACTIVE)
|
||||||
wattrset(mixer_widget.window, attr_ctl_frame);
|
wattrset(mixer_widget.window, attr_ctl_frame);
|
||||||
waddstr(mixer_widget.window, "<>");
|
waddstr(mixer_widget.window, "<>");
|
||||||
if (control->flags & IS_ACTIVE)
|
if (control->flags & IS_ACTIVE)
|
||||||
wattrset(mixer_widget.window, attr_mixer_active);
|
wattrset(mixer_widget.window, attr_mixer_active);
|
||||||
wprintw(mixer_widget.window, "%-3d", lrint(volumes[1] * 100));
|
wprintw(mixer_widget.window, "%-3d", (int)lrint(volumes[1] * 100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue