diff --git a/osu.Game/GameModes/Play/PlaySongSelect.cs b/osu.Game/GameModes/Play/PlaySongSelect.cs index c790036d7f..06f7d8f914 100644 --- a/osu.Game/GameModes/Play/PlaySongSelect.cs +++ b/osu.Game/GameModes/Play/PlaySongSelect.cs @@ -3,12 +3,15 @@ using System; using System.Collections.Generic; +using osu.Framework.Configuration; using osu.Game.GameModes.Backgrounds; namespace osu.Game.GameModes.Play { class PlaySongSelect : GameModeWhiteBox { + private Bindable playMode; + protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4"); protected override IEnumerable PossibleChildren => new[] { @@ -22,7 +25,15 @@ namespace osu.Game.GameModes.Play OsuGame osu = Game as OsuGame; - osu.PlayMode.ValueChanged += PlayMode_ValueChanged; + playMode = osu.PlayMode; + playMode.ValueChanged += PlayMode_ValueChanged; + } + + protected override void Dispose(bool isDisposing) + { + base.Dispose(isDisposing); + + playMode.ValueChanged -= PlayMode_ValueChanged; } private void PlayMode_ValueChanged(object sender, EventArgs e) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index fd0c92eabe..d8ae0b05a1 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -37,7 +37,7 @@ namespace osu.Game { base.Load(); - //attach out bindables to the audio subsystem. + //attach our bindables to the audio subsystem. Audio.Volume.Weld(Config.GetBindable(OsuConfig.VolumeGlobal)); Audio.VolumeSample.Weld(Config.GetBindable(OsuConfig.VolumeEffect)); Audio.VolumeTrack.Weld(Config.GetBindable(OsuConfig.VolumeMusic));