UI: Properly disable selecting Metal on non-Mac platforms

This commit is contained in:
Evan Husted 2024-12-23 22:32:37 -06:00
parent f3dcb80a60
commit e82a90993c
2 changed files with 17 additions and 15 deletions

View File

@ -33,18 +33,20 @@
ToolTip.Tip="{ext:Locale SettingsTabGraphicsBackendTooltip}" ToolTip.Tip="{ext:Locale SettingsTabGraphicsBackendTooltip}"
Text="{ext:Locale SettingsTabGraphicsBackend}" Text="{ext:Locale SettingsTabGraphicsBackend}"
Width="250" /> Width="250" />
<ComboBox Width="350" <ComboBox
HorizontalContentAlignment="Left" Name="GraphicsBackendSelector"
ToolTip.Tip="{ext:Locale SettingsTabGraphicsBackendTooltip}" Width="350"
SelectedIndex="{Binding GraphicsBackendIndex}"> HorizontalContentAlignment="Left"
ToolTip.Tip="{ext:Locale SettingsTabGraphicsBackendTooltip}"
SelectedIndex="{Binding GraphicsBackendIndex}">
<ComboBoxItem IsVisible="{Binding IsVulkanAvailable}"> <ComboBoxItem IsVisible="{Binding IsVulkanAvailable}">
<TextBlock Text="Vulkan" /> <TextBlock Text="Vulkan" />
</ComboBoxItem> </ComboBoxItem>
<ComboBoxItem IsEnabled="{Binding IsOpenGLAvailable}"> <ComboBoxItem IsEnabled="{Binding IsOpenGLAvailable}">
<TextBlock Text="OpenGL" /> <TextBlock Text="OpenGL" />
</ComboBoxItem> </ComboBoxItem>
<ComboBoxItem IsVisible="{Binding IsMetalAvailable}"> <ComboBoxItem IsEnabled="{Binding IsMetalAvailable}">
<TextBlock Text="Metal" /> <TextBlock Text="Metal (Experimental)" />
</ComboBoxItem> </ComboBoxItem>
</ComboBox> </ComboBox>
</StackPanel> </StackPanel>

View File

@ -56,34 +56,34 @@ namespace Ryujinx.Ava.UI.Windows
{ {
switch (navItem.Tag.ToString()) switch (navItem.Tag.ToString())
{ {
case "UiPage": case nameof(UiPage):
UiPage.ViewModel = ViewModel; UiPage.ViewModel = ViewModel;
NavPanel.Content = UiPage; NavPanel.Content = UiPage;
break; break;
case "InputPage": case nameof(InputPage):
NavPanel.Content = InputPage; NavPanel.Content = InputPage;
break; break;
case "HotkeysPage": case nameof(HotkeysPage):
NavPanel.Content = HotkeysPage; NavPanel.Content = HotkeysPage;
break; break;
case "SystemPage": case nameof(SystemPage):
SystemPage.ViewModel = ViewModel; SystemPage.ViewModel = ViewModel;
NavPanel.Content = SystemPage; NavPanel.Content = SystemPage;
break; break;
case "CpuPage": case nameof(CpuPage):
NavPanel.Content = CpuPage; NavPanel.Content = CpuPage;
break; break;
case "GraphicsPage": case nameof(GraphicsPage):
NavPanel.Content = GraphicsPage; NavPanel.Content = GraphicsPage;
break; break;
case "AudioPage": case nameof(AudioPage):
NavPanel.Content = AudioPage; NavPanel.Content = AudioPage;
break; break;
case "NetworkPage": case nameof(NetworkPage):
NetworkPage.ViewModel = ViewModel; NetworkPage.ViewModel = ViewModel;
NavPanel.Content = NetworkPage; NavPanel.Content = NetworkPage;
break; break;
case "LoggingPage": case nameof(LoggingPage):
NavPanel.Content = LoggingPage; NavPanel.Content = LoggingPage;
break; break;
default: default: