1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 15:43:22 +08:00

Read default beat divisor from beatmap

This commit is contained in:
smoogipoo 2019-11-08 17:12:47 +09:00
parent 6805c029e7
commit eb9fff96ba

View File

@ -64,7 +64,10 @@ namespace osu.Game.Screens.Edit
{
this.host = host;
// TODO: should probably be done at a DrawableRuleset level to share logic with Player.
beatDivisor.Value = Beatmap.Value.BeatmapInfo.BeatDivisor;
beatDivisor.BindValueChanged(divisor => Beatmap.Value.BeatmapInfo.BeatDivisor = divisor.NewValue);
// Todo: should probably be done at a DrawableRuleset level to share logic with Player.
var sourceClock = (IAdjustableClock)Beatmap.Value.Track ?? new StopwatchClock();
clock = new EditorClock(Beatmap.Value, beatDivisor) { IsCoupled = false };
clock.ChangeSource(sourceClock);