diff --git a/osu.Framework.iOS/IOSGameHost.cs b/osu.Framework.iOS/IOSGameHost.cs index 94b95ff14d..91d860816e 100644 --- a/osu.Framework.iOS/IOSGameHost.cs +++ b/osu.Framework.iOS/IOSGameHost.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using Foundation; using osu.Framework.Configuration; using osu.Framework.Extensions; @@ -11,6 +12,8 @@ using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Video; using osu.Framework.Input.Bindings; +using osu.Framework.Input.Handlers; +using osu.Framework.Input.Handlers.Mouse; using osu.Framework.IO.Stores; using osu.Framework.iOS.Graphics.Textures; using osu.Framework.iOS.Graphics.Video; @@ -85,6 +88,20 @@ public override IResourceStore CreateTextureLoaderStore(IResource public override VideoDecoder CreateVideoDecoder(Stream stream) => new IOSVideoDecoder(Renderer, stream); + protected override IEnumerable CreateAvailableInputHandlers() + { + var handlers = base.CreateAvailableInputHandlers(); + + foreach (var h in handlers.OfType()) + { + // Similar to macOS, "relative mode" is also broken on iOS. + h.UseRelativeMode.Value = false; + h.UseRelativeMode.Default = false; + } + + return handlers; + } + public override ISystemFileSelector? CreateSystemFileSelector(string[] allowedExtensions) { IOSFileSelector? selector = null;