Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some .NET 8 CA1416 android inspections #6171

Merged
merged 3 commits into from Feb 4, 2024

Conversation

Susko3
Copy link
Member

@Susko3 Susko3 commented Feb 2, 2024

Fixes some inspections from the .NET 8 upgrade as seen in https://github.com/ppy/osu-framework/actions/runs/7754422132.

Fixes warnings such as the following:

This call site is reachable on: 'Android' 21.0 and later. 'MotionEventButtonState.StylusPrimary' is only supported on: 'android' 23.0 and later. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Those warnings are new in .NET 8 because enum values are now also annotated.

Previously, mouse buttons wouldn't work on platforms < API 23 (unverified).
I have not testes the code on older APIs, but the `else` branch works as expected on newer APIs.
@smoogipoo smoogipoo merged commit a1ebebf into ppy:master Feb 4, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants