Skip to content

Commit

Permalink
Merge pull request ppy#28228 from Susko3/show-mouse-joystick-settings…
Browse files Browse the repository at this point in the history
…-mobile

Show mouse and joystick settings on mobile
  • Loading branch information
smoogipoo authored May 20, 2024
2 parents 2aa9328 + 04acc58 commit e6baa06
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
12 changes: 6 additions & 6 deletions osu.Game/OsuGameBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -578,17 +578,17 @@ public virtual SettingsSubsection CreateSettingsSubsectionFor(InputHandler handl
{
case ITabletHandler th:
return new TabletSettings(th);

case MouseHandler mh:
return new MouseSettings(mh);

case JoystickHandler jh:
return new JoystickSettings(jh);
}
}

switch (handler)
{
case MouseHandler mh:
return new MouseSettings(mh);

case JoystickHandler jh:
return new JoystickSettings(jh);

case TouchHandler th:
return new TouchSettings(th);

Expand Down
15 changes: 10 additions & 5 deletions osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,17 @@ protected override void LoadComplete()

highPrecisionMouse.Current.BindValueChanged(highPrecision =>
{
if (RuntimeInfo.OS != RuntimeInfo.Platform.Windows)
switch (RuntimeInfo.OS)
{
if (highPrecision.NewValue)
highPrecisionMouse.SetNoticeText(MouseSettingsStrings.HighPrecisionPlatformWarning, true);
else
highPrecisionMouse.ClearNoticeText();
case RuntimeInfo.Platform.Linux:
case RuntimeInfo.Platform.macOS:
case RuntimeInfo.Platform.iOS:
if (highPrecision.NewValue)
highPrecisionMouse.SetNoticeText(MouseSettingsStrings.HighPrecisionPlatformWarning, true);
else
highPrecisionMouse.ClearNoticeText();

break;
}
}, true);
}
Expand Down

0 comments on commit e6baa06

Please sign in to comment.