Change MachineSyncBias prefs to an enum SyncBias, Changing this song triggers a reload of songs, added new option effect for reloading songs
This commit is contained in:
+3
-3
@@ -481,7 +481,7 @@ bool Song::ReloadFromSongDir( RString sDir )
|
||||
if (SONGMAN->GetGroup(this) != nullptr) {
|
||||
m_SongTiming.m_fBeat0GroupOffsetInSeconds = SONGMAN->GetGroup(this)->GetSyncOffset();
|
||||
} else {
|
||||
m_SongTiming.m_fBeat0GroupOffsetInSeconds = PREFSMAN->m_fMachineSyncBias;
|
||||
m_SongTiming.m_fBeat0GroupOffsetInSeconds = PREFSMAN->m_MachineSyncBias == SyncBias_NULL ? 0 : -0.009;
|
||||
LOG->Warn("Song %s has no group, using machine sync bias.", m_sMainTitle.c_str());
|
||||
}
|
||||
|
||||
@@ -507,7 +507,7 @@ bool Song::ReloadFromSongDir( RString sDir )
|
||||
}
|
||||
else
|
||||
{
|
||||
m_SongTiming.m_fBeat0GroupOffsetInSeconds = PREFSMAN->m_fMachineSyncBias;
|
||||
m_SongTiming.m_fBeat0GroupOffsetInSeconds = PREFSMAN->m_MachineSyncBias == SyncBias_NULL ? 0 : -0.009;
|
||||
LOG->Warn("Song %s has no group, using machine sync bias.", m_sMainTitle.c_str());
|
||||
}
|
||||
}
|
||||
@@ -672,7 +672,7 @@ 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;
|
||||
float fOffset = PREFSMAN->m_MachineSyncBias == SyncBias_NULL ? 0 : -0.009;
|
||||
if (SONGMAN->GetGroupFromName(m_sGroupName) != nullptr)
|
||||
{
|
||||
fOffset = SONGMAN->GetGroupFromName(m_sGroupName)->GetSyncOffset();
|
||||
|
||||
Reference in New Issue
Block a user