Skip to content
Snippets Groups Projects
Commit 3d668d87 authored by Alessandro Simovic's avatar Alessandro Simovic Committed by Lorenz Meier
Browse files

tunes: don't let tune interrupt itself

parent 52542f98
No related branches found
No related tags found
No related merge requests found
......@@ -94,6 +94,12 @@ int Tunes::set_control(const tune_control_s &tune_control)
tune_control.tune_override || // Override interrupts everything
_default_tunes_interruptable[_current_tune_id]) {
// Check if this exact tune is already being played back
if (tune_control.tune_id != static_cast<int>(TuneID::CUSTOM) &&
_tune == _default_tunes[tune_control.tune_id]) {
return OK; // Nothing to do
}
// Reset repeat flag. Can jump to true again while tune is being parsed later
_repeat = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment