Browse Source

Fix render mode fallback for Metal (#15348)

pull/15367/head
Shatyuka 2 years ago
committed by GitHub
parent
commit
e0d4be0f44
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      src/Avalonia.Native/AvaloniaNativePlatform.cs

3
src/Avalonia.Native/AvaloniaNativePlatform.cs

@ -138,15 +138,14 @@ namespace Avalonia.Native
// ignored // ignored
} }
} }
#pragma warning disable CS0618
else if (mode == AvaloniaNativeRenderingMode.Metal) else if (mode == AvaloniaNativeRenderingMode.Metal)
#pragma warning restore CS0618
{ {
try try
{ {
var metal = new MetalPlatformGraphics(_factory); var metal = new MetalPlatformGraphics(_factory);
metal.CreateContext().Dispose(); metal.CreateContext().Dispose();
_platformGraphics = metal; _platformGraphics = metal;
break;
} }
catch catch
{ {

Loading…
Cancel
Save