Skip to content

Commit

Permalink
Merge pull request #6532 from Susko3/only-create-pen-handler-on-sdl3
Browse files Browse the repository at this point in the history
Only create `PenHandler` on SDL3
  • Loading branch information
smoogipoo authored Feb 19, 2025
2 parents 76085e5 + dbdb4ea commit b8f11c9
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions osu.Framework/Platform/SDLGameHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,19 @@ protected override Clipboard CreateClipboard()
? new SDL3Clipboard(PngFormat.Instance) // PNG works well on linux
: new SDL2Clipboard();

protected override IEnumerable<InputHandler> CreateAvailableInputHandlers() =>
new InputHandler[]
{
new KeyboardHandler(),
// tablet should get priority over mouse to correctly handle cases where tablet drivers report as mice as well.
new OpenTabletDriverHandler(),
new PenHandler(),
new MouseHandler(),
new TouchHandler(),
new JoystickHandler(),
new MidiHandler(),
};
protected override IEnumerable<InputHandler> CreateAvailableInputHandlers()
{
yield return new KeyboardHandler();
// tablet should get priority over mouse to correctly handle cases where tablet drivers report as mice as well.
yield return new OpenTabletDriverHandler();

if (FrameworkEnvironment.UseSDL3)
yield return new PenHandler();

yield return new MouseHandler();
yield return new TouchHandler();
yield return new JoystickHandler();
yield return new MidiHandler();
}
}
}

0 comments on commit b8f11c9

Please sign in to comment.