UI: Collapse IsHypervisorAvailable and IsMetalAvailable into IsAppleSiliconMac

This commit is contained in:
Evan Husted 2024-12-23 22:37:15 -06:00
parent 3aaeaf3540
commit a335c8ff2b
3 changed files with 3 additions and 6 deletions

View File

@ -120,12 +120,9 @@ namespace Ryujinx.Ava.UI.ViewModels
} }
} }
public bool IsMetalAvailable =>
OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64;
public bool IsOpenGLAvailable => !OperatingSystem.IsMacOS(); public bool IsOpenGLAvailable => !OperatingSystem.IsMacOS();
public bool IsHypervisorAvailable => OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64; public bool IsAppleSiliconMac => OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64;
public bool GameDirectoryChanged public bool GameDirectoryChanged
{ {

View File

@ -69,7 +69,7 @@
</ComboBox> </ComboBox>
</StackPanel> </StackPanel>
<CheckBox IsChecked="{Binding UseHypervisor}" <CheckBox IsChecked="{Binding UseHypervisor}"
IsVisible="{Binding IsHypervisorAvailable}" IsVisible="{Binding IsAppleSiliconMac}"
ToolTip.Tip="{ext:Locale UseHypervisorTooltip}"> ToolTip.Tip="{ext:Locale UseHypervisorTooltip}">
<TextBlock Text="{ext:Locale SettingsTabSystemUseHypervisor}" <TextBlock Text="{ext:Locale SettingsTabSystemUseHypervisor}"
ToolTip.Tip="{ext:Locale UseHypervisorTooltip}" /> ToolTip.Tip="{ext:Locale UseHypervisorTooltip}" />

View File

@ -45,7 +45,7 @@
<ComboBoxItem IsEnabled="{Binding IsOpenGLAvailable}"> <ComboBoxItem IsEnabled="{Binding IsOpenGLAvailable}">
<TextBlock Text="OpenGL" /> <TextBlock Text="OpenGL" />
</ComboBoxItem> </ComboBoxItem>
<ComboBoxItem IsEnabled="{Binding IsMetalAvailable}"> <ComboBoxItem IsEnabled="{Binding IsAppleSiliconMac}">
<TextBlock Text="Metal (ARM Mac only, Experimental)" /> <TextBlock Text="Metal (ARM Mac only, Experimental)" />
</ComboBoxItem> </ComboBoxItem>
</ComboBox> </ComboBox>