1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

Allow keeping stream open after encoding scores

This commit is contained in:
Dan Balasescu 2022-12-13 16:15:14 +09:00
parent 5800734589
commit ad7554cc7d

View File

@ -53,9 +53,9 @@ namespace osu.Game.Scoring.Legacy
throw new ArgumentException(@"Only scores in the osu, taiko, catch, or mania rulesets can be encoded to the legacy score format.", nameof(score));
}
public void Encode(Stream stream)
public void Encode(Stream stream, bool leaveOpen = false)
{
using (SerializationWriter sw = new SerializationWriter(stream))
using (SerializationWriter sw = new SerializationWriter(stream, leaveOpen))
{
sw.Write((byte)(score.ScoreInfo.Ruleset.OnlineID));
sw.Write(LATEST_VERSION);