Skip to content

Commit

Permalink
Disable OnScreenKeyboardOverlapsGameWindow on iOS when hardware key…
Browse files Browse the repository at this point in the history
…board is attached
  • Loading branch information
frenzibyte committed Nov 4, 2024
1 parent 451f8b2 commit 141f9b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion osu.Framework.iOS/IOSGameHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.IO;
using Foundation;
using GameController;
using osu.Framework.Configuration;
using osu.Framework.Extensions;
using osu.Framework.Extensions.ObjectExtensions;
Expand Down Expand Up @@ -38,7 +39,7 @@ protected override void SetupConfig(IDictionary<FrameworkSetting, object> defaul
base.SetupConfig(defaultOverrides);
}

public override bool OnScreenKeyboardOverlapsGameWindow => true;
public override bool OnScreenKeyboardOverlapsGameWindow => !OperatingSystem.IsIOSVersionAtLeast(14) || GCKeyboard.CoalescedKeyboard == null;

public override bool CanExit => false;

Expand Down
3 changes: 2 additions & 1 deletion osu.Framework/Platform/GameHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ public abstract class GameHost : IIpcHost, IDisposable
public event Func<IpcMessage, IpcMessage> MessageReceived;

/// <summary>
/// Whether the on screen keyboard covers a portion of the game window when presented to the user.
/// Whether the on-screen keyboard covers a portion of the game window when presented to the user.
/// This is usually true on mobile platforms, but may change to false if a hardware keyboard is connected.
/// </summary>
public virtual bool OnScreenKeyboardOverlapsGameWindow => false;

Expand Down

0 comments on commit 141f9b0

Please sign in to comment.