mirror of
https://github.com/osukey/osukey.git
synced 2025-05-23 14:37:39 +09:00
Reschedule results display delegate to avoid potential softlocks in the future
This commit is contained in:
parent
59728b0ccb
commit
a810afafb3
@ -780,19 +780,11 @@ namespace osu.Game.Screens.Play
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// A final display will only occur once all work is completed in <see cref="PrepareScoreForResultsAsync"/>. This means that even after calling this method, the results screen will never be shown until <see cref="JudgementProcessor.HasCompleted">ScoreProcessor.HasCompleted</see> becomes <see langword="true"/>.
|
/// A final display will only occur once all work is completed in <see cref="PrepareScoreForResultsAsync"/>. This means that even after calling this method, the results screen will never be shown until <see cref="JudgementProcessor.HasCompleted">ScoreProcessor.HasCompleted</see> becomes <see langword="true"/>.
|
||||||
///
|
|
||||||
/// Calling this method multiple times will have no effect.
|
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="withDelay">Whether a minimum delay (<see cref="RESULTS_DISPLAY_DELAY"/>) should be added before the screen is displayed.</param>
|
/// <param name="withDelay">Whether a minimum delay (<see cref="RESULTS_DISPLAY_DELAY"/>) should be added before the screen is displayed.</param>
|
||||||
private void progressToResults(bool withDelay)
|
private void progressToResults(bool withDelay)
|
||||||
{
|
{
|
||||||
if (resultsDisplayDelegate != null)
|
resultsDisplayDelegate?.Cancel();
|
||||||
// Note that if progressToResults is called one withDelay=true and then withDelay=false, this no-delay timing will not be
|
|
||||||
// accounted for. shouldn't be a huge concern (a user pressing the skip button after a results progression has already been queued
|
|
||||||
// may take x00 more milliseconds than expected in the very rare edge case).
|
|
||||||
//
|
|
||||||
// If required we can handle this more correctly by rescheduling here.
|
|
||||||
return;
|
|
||||||
|
|
||||||
double delay = withDelay ? RESULTS_DISPLAY_DELAY : 0;
|
double delay = withDelay ? RESULTS_DISPLAY_DELAY : 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user