1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

Fix cursor expansion state potentially being incorrect

This commit is contained in:
smoogipoo 2019-06-25 15:47:32 +09:00
parent f2207aae4e
commit 0d98d637b6

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
@ -73,7 +74,10 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
{ {
case OsuAction.LeftButton: case OsuAction.LeftButton:
case OsuAction.RightButton: case OsuAction.RightButton:
if (--downCount == 0) // Todo: Math.Max() is required as a temporary measure to address https://github.com/ppy/osu-framework/issues/2576
downCount = Math.Max(0, downCount - 1);
if (downCount == 0)
updateExpandedState(); updateExpandedState();
break; break;
} }