Skip to content

Commit

Permalink
Sync Lock: Fix issue where single playing sync deck was syncing again…
Browse files Browse the repository at this point in the history
…st its nudge value
  • Loading branch information
ywwg committed Jun 1, 2021
1 parent 35ed9c9 commit ec01df8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/engine/sync/enginesync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ void EngineSync::requestSyncMode(Syncable* pSyncable, SyncMode mode) {
default:;
}

Syncable* pOnlyPlayer = getUniquePlayingSyncedDeck();
if (pOnlyPlayer) {
// This resets the user offset, so that if this deck gets used as the params syncable
// it will have that offset removed.
pOnlyPlayer->notifyOnlyPlayingSyncable();
}

// Second, figure out what Syncable should be used to initialize the master
// parameters, if any. Usually this is the new master. (Note, that pointer might be null!)
Syncable* pParamsSyncable = m_pMasterSyncable;
Expand All @@ -96,10 +103,6 @@ void EngineSync::requestSyncMode(Syncable* pSyncable, SyncMode mode) {
}
}

Syncable* pOnlyPlayer = getUniquePlayingSyncedDeck();
if (pOnlyPlayer) {
pOnlyPlayer->notifyOnlyPlayingSyncable();
}
}

void EngineSync::activateFollower(Syncable* pSyncable) {
Expand Down

0 comments on commit ec01df8

Please sign in to comment.