Add new preference: DefaultGroupOffsetSeconds to dictate the default sync bias on the machine when no group.ini is present (or if there is no SyncOffset field in said file).

- Generally Supports either ITG (9ms) or NULL (0ms).
- Alternatively, one could edit the preference manually to put a different value
- Name/Description probably worth ironing out
This commit is contained in:
Crash Cringle
2025-03-03 23:25:32 -08:00
committed by teejusb
parent 835ca35065
commit 00342feadc
7 changed files with 23 additions and 11 deletions
+9 -7
View File
@@ -43,7 +43,7 @@ Group::Group(const RString sDir, const RString &sGroupDirName) {
RString Series = "";
RString bannerPath = "";
RString authorsNotes = "";
float fOffset = 0;
float fOffset = PREFSMAN->m_fDefaultGroupOffsetSeconds;
if (FILEMAN->DoesFileExist(sGroupIniPath)) {
IniFile ini;
@@ -65,12 +65,14 @@ Group::Group(const RString sDir, const RString &sGroupDirName) {
RString sValue = "";
ini.GetValue("Group", "SyncOffset", sValue);
if (sValue.CompareNoCase("null") == 0) {
fOffset = 0;
} else if (sValue.CompareNoCase("itg") == 0) {
fOffset = 0.009f;
} else {
fOffset = StringToFloat(sValue);
if (!sValue.empty()) {
if (sValue.CompareNoCase("null") == 0) {
fOffset = 0.0f;
} else if (sValue.CompareNoCase("itg") == 0) {
fOffset = 0.009f;
} else {
fOffset = StringToFloat(sValue);
}
}
ini.GetValue("Group", "Year", m_iYearReleased);
ini.GetValue( "Group", "Credits", credits );