diff --git a/src/ProjectMWrapper.cpp b/src/ProjectMWrapper.cpp index db49dc3..75894f1 100644 --- a/src/ProjectMWrapper.cpp +++ b/src/ProjectMWrapper.cpp @@ -225,14 +225,20 @@ void ProjectMWrapper::PresetSwitchedEvent(bool isHardCut, unsigned int index, vo void ProjectMWrapper::PlaybackControlNotificationHandler(const Poco::AutoPtr& notification) { + bool shuffleEnabled = projectm_playlist_get_shuffle(_playlist); + switch (notification->ControlAction()) { case PlaybackControlNotification::Action::NextPreset: + projectm_playlist_set_shuffle(_playlist, false); projectm_playlist_play_next(_playlist, !notification->SmoothTransition()); + projectm_playlist_set_shuffle(_playlist, shuffleEnabled); break; case PlaybackControlNotification::Action::PreviousPreset: + projectm_playlist_set_shuffle(_playlist, false); projectm_playlist_play_previous(_playlist, !notification->SmoothTransition()); + projectm_playlist_set_shuffle(_playlist, shuffleEnabled); break; case PlaybackControlNotification::Action::LastPreset: @@ -240,7 +246,6 @@ void ProjectMWrapper::PlaybackControlNotificationHandler(const Poco::AutoPtrSmoothTransition()); projectm_playlist_set_shuffle(_playlist, shuffleEnabled); @@ -248,7 +253,7 @@ void ProjectMWrapper::PlaybackControlNotificationHandler(const Poco::AutoPtrsetBool("projectM.shuffleEnabled", !projectm_playlist_get_shuffle(_playlist)); + _userConfig->setBool("projectM.shuffleEnabled", !shuffleEnabled); break; case PlaybackControlNotification::Action::TogglePresetLocked: {