do not attempt to change volume if requested value is <0 or >100
This commit is contained in:
@@ -512,7 +512,7 @@ void Connection::SetConsume(bool mode) const
|
|||||||
|
|
||||||
void Connection::SetVolume(int vol)
|
void Connection::SetVolume(int vol)
|
||||||
{
|
{
|
||||||
if (isConnected)
|
if (isConnected && vol >= 0 && vol <= 100)
|
||||||
{
|
{
|
||||||
mpd_sendSetvolCommand(itsConnection, vol);
|
mpd_sendSetvolCommand(itsConnection, vol);
|
||||||
mpd_finishCommand(itsConnection);
|
mpd_finishCommand(itsConnection);
|
||||||
|
|||||||
Reference in New Issue
Block a user