mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Centralise MakeCurrent call
This commit is contained in:
parent
c532f77657
commit
14453da1d2
@ -319,6 +319,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
if (this.IsCurrentScreen())
|
||||
performImmediateExit();
|
||||
else
|
||||
this.MakeCurrent();
|
||||
}
|
||||
|
||||
private ScheduledDelegate completionProgressDelegate;
|
||||
|
@ -5,7 +5,6 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Screens.Play;
|
||||
@ -49,11 +48,7 @@ namespace osu.Game.Screens.Ranking.Pages
|
||||
background.Colour = colours.Green;
|
||||
|
||||
if (player != null)
|
||||
Action = () =>
|
||||
{
|
||||
player.Restart();
|
||||
player.MakeCurrent();
|
||||
};
|
||||
Action = () => player.Restart();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -262,7 +262,6 @@ namespace osu.Game.Screens.Ranking
|
||||
if (!this.IsCurrentScreen()) return;
|
||||
|
||||
player.Restart();
|
||||
player.MakeCurrent();
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user