From: APTX Date: Mon, 21 Feb 2022 13:22:17 +0000 (+0900) Subject: Only notify volume has changed if it really did X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=8985e4e8efc3d12a2c07e2d54b9984e60c1e0301;p=aniplayer.git Only notify volume has changed if it really did --- diff --git a/core/player.cpp b/core/player.cpp index 559c774..6b67651 100644 --- a/core/player.cpp +++ b/core/player.cpp @@ -191,6 +191,10 @@ void Player::previous() { void Player::setVolume(Volume volume) { volume = qBound(Volume{}, volume, m_maxVolume); + + if (qFuzzyCompare(m_volume, volume)) + return; + m_backend->setVolume(volume); }