mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Don't bother calculating active keys if input source was not handled
This commit is contained in:
@ -2,6 +2,7 @@
|
|||||||
// 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.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
@ -149,15 +150,14 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
base.OnTouchUp(e);
|
base.OnTouchUp(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool handleDown(object source, Vector2 position)
|
private bool handleDown(object inputSource, Vector2 position)
|
||||||
{
|
{
|
||||||
TouchCatchAction catchAction = getTouchCatchActionFromInput(position);
|
TouchCatchAction catchAction = getTouchCatchActionFromInput(position);
|
||||||
|
|
||||||
if (catchAction == TouchCatchAction.None)
|
if (catchAction == TouchCatchAction.None)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
trackedActionSources[source] = catchAction;
|
trackedActionSources[inputSource] = catchAction;
|
||||||
|
|
||||||
calculateActiveKeys();
|
calculateActiveKeys();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -165,9 +165,8 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
|
|
||||||
private void handleUp(object source)
|
private void handleUp(object source)
|
||||||
{
|
{
|
||||||
trackedActionSources.Remove(source);
|
if (trackedActionSources.Remove(source))
|
||||||
|
calculateActiveKeys();
|
||||||
calculateActiveKeys();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void calculateActiveKeys()
|
private void calculateActiveKeys()
|
||||||
|
Reference in New Issue
Block a user