mirror of
https://gitlab.gnome.org/GNOME/libgnome-volume-control.git
synced 2024-11-23 01:10:40 -05:00
mixer-control: Remove unnecessary instance checks
gvc_mixer_control_get_vol_max_norm() and gvc_mixer_control_get_vol_max_amplified() do not access any of the instance variables. In GNOME Settings, we even pass NULL to these functions. So checking the instance is not necessary. In fact, this is causing instance check failures in GNOME Settings, and the entire Sound panel is broken since those functions are returning zero. The reason that only the checks are being dropped, and not the parameter entirely, is to preserve API compatibility.
This commit is contained in:
parent
468022b708
commit
2a7a100a13
@ -3744,13 +3744,11 @@ gvc_mixer_control_new (const char *name)
|
|||||||
gdouble
|
gdouble
|
||||||
gvc_mixer_control_get_vol_max_norm (GvcMixerControl *control)
|
gvc_mixer_control_get_vol_max_norm (GvcMixerControl *control)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GVC_IS_MIXER_CONTROL (control), 0);
|
|
||||||
return (gdouble) PA_VOLUME_NORM;
|
return (gdouble) PA_VOLUME_NORM;
|
||||||
}
|
}
|
||||||
|
|
||||||
gdouble
|
gdouble
|
||||||
gvc_mixer_control_get_vol_max_amplified (GvcMixerControl *control)
|
gvc_mixer_control_get_vol_max_amplified (GvcMixerControl *control)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GVC_IS_MIXER_CONTROL (control), 0);
|
|
||||||
return (gdouble) PA_VOLUME_UI_MAX;
|
return (gdouble) PA_VOLUME_UI_MAX;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user