Skip to content

Commit

Permalink
Add dmi parsing step to add delays to states that only specify a fram…
Browse files Browse the repository at this point in the history
…e count
  • Loading branch information
DrSmugleaf committed Nov 24, 2023
1 parent 209b43d commit dd44f12
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion SpaceWizards.RsiLib/DMI/Metadata/RawMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,17 @@ public bool TryState([NotNullWhen(true)] out DmiState? state)
}
}

if (state is { Frames: > 1, Delay: null })
{
var delay = new List<float>();
for (var i = 0; i < state.Frames; i++)
{
delay.Add(0.1f);
}

state = state with { Delay = delay };
}

return true;
}
}
}

0 comments on commit dd44f12

Please sign in to comment.