Move sync offset application to song load (as early as possible)

This commit is contained in:
Crash Cringle
2025-03-03 23:25:32 -08:00
committed by teejusb
parent 9d61cb4c06
commit 8f6d5b44b9
2 changed files with 26 additions and 19 deletions
+10
View File
@@ -655,9 +655,19 @@ void Song::TidyUpData( bool from_cache, bool /* duringCache */ )
m_SongTiming.TidyUpData(false);
// Apply the group offset to the song timing before we do anything else.
float fOffset = PREFSMAN->m_fMachineSyncBias;
if (SONGMAN->GetGroupFromName(m_sGroupName) != nullptr)
{
fOffset = SONGMAN->GetGroupFromName(m_sGroupName)->GetSyncOffset();
}
m_SongTiming.m_fBeat0GroupOffsetInSeconds = fOffset;
for (Steps *s : m_vpSteps)
{
s->m_Timing.TidyUpData(true);
// Apply the group offset to the step timing as well.
s->m_Timing.m_fBeat0GroupOffsetInSeconds = fOffset;
}
if(!from_cache)