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

Centralise MakeCurrent call

This commit is contained in:
Dean Herbert 2019-11-01 15:51:10 +09:00
parent c532f77657
commit 14453da1d2
3 changed files with 3 additions and 7 deletions

View File

@ -319,6 +319,8 @@ namespace osu.Game.Screens.Play
if (this.IsCurrentScreen()) if (this.IsCurrentScreen())
performImmediateExit(); performImmediateExit();
else
this.MakeCurrent();
} }
private ScheduledDelegate completionProgressDelegate; private ScheduledDelegate completionProgressDelegate;

View File

@ -5,7 +5,6 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Screens;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
@ -49,11 +48,7 @@ namespace osu.Game.Screens.Ranking.Pages
background.Colour = colours.Green; background.Colour = colours.Green;
if (player != null) if (player != null)
Action = () => Action = () => player.Restart();
{
player.Restart();
player.MakeCurrent();
};
} }
} }
} }

View File

@ -262,7 +262,6 @@ namespace osu.Game.Screens.Ranking
if (!this.IsCurrentScreen()) return; if (!this.IsCurrentScreen()) return;
player.Restart(); player.Restart();
player.MakeCurrent();
}, },
}, },
}; };