Skip to content

Commit 367ecf2

Browse files
committed
Fix some os version warnings
1 parent d92adea commit 367ecf2

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

engine/Orbit.Input/Orbit.Input.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<!-- <GenerateDocumentationFile>True</GenerateDocumentationFile>-->
1414

15-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">12.2</SupportedOSPlatformVersion>
15+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
1616
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
1717
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
1818
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
@@ -44,10 +44,6 @@
4444
<Configurations>Release;Debug</Configurations>
4545
</PropertyGroup>
4646

47-
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
48-
<NoWarn>1701;1702;CA1416</NoWarn>
49-
</PropertyGroup>
50-
5147
<ItemGroup>
5248
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
5349
</ItemGroup>

engine/Orbit.Input/Platforms/MacCatalyst/GameController.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ public GameController(GCController controller)
2525
West = new ButtonValue<bool>(this, nameof(West));
2626
Pause = new ButtonValue<bool>(this, nameof(Pause));
2727

28-
controller.PhysicalInputProfile.ValueDidChangeHandler += Changed;
28+
if (OperatingSystem.IsMacOSVersionAtLeast(16))
29+
{
30+
controller.PhysicalInputProfile.ValueDidChangeHandler += Changed;
31+
}
2932
}
3033

3134
private void Changed(GCPhysicalInputProfile gamepad, GCControllerElement element)

engine/Orbit.Input/Platforms/iOS/GameController.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ public GameController(GCController controller)
2828
East = new ButtonValue<bool>(this, nameof(East));
2929
West = new ButtonValue<bool>(this, nameof(West));
3030
Pause = new ButtonValue<bool>(this, nameof(Pause));
31-
32-
controller.PhysicalInputProfile.ValueDidChangeHandler += Changed;
31+
32+
if (OperatingSystem.IsIOSVersionAtLeast(16))
33+
{
34+
controller.PhysicalInputProfile.ValueDidChangeHandler += Changed;
35+
}
3336
}
3437

3538
private void Changed(GCPhysicalInputProfile gamepad, GCControllerElement element)

0 commit comments

Comments
 (0)