Skip to content

Commit

Permalink
Another attempt to fix infinite recursion in shuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin authored and john-preston committed Oct 12, 2023
1 parent 013e7e9 commit bb5e7fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/platform/linux/base_system_media_controls_linux.cpp
Expand Up @@ -345,7 +345,9 @@ void SystemMediaControls::setLoopStatus(LoopStatus status) {
void SystemMediaControls::setShuffle(bool value) {
// prevent property update -> rpl event -> property update recursion
_private->playerData().inSetShuffle = true;
_private->player().set_shuffle(value);
if (_private->player().get_shuffle() != value) {
_private->player().set_shuffle(value);
}
_private->playerData().inSetShuffle = false;
}

Expand Down

0 comments on commit bb5e7fa

Please sign in to comment.