mirror of
https://github.com/libretro/MesenCE.git
synced 2026-11-10 11:11:32 -10:00
Also fixes DX11.0 support (for Win7 PCs that aren't fully updated), which stopped working after the recent variable refresh rate changes
214 lines
11 KiB
XML
214 lines
11 KiB
XML
<UserControl
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:vm="using:Mesen.ViewModels"
|
|
xmlns:c="using:Mesen.Controls"
|
|
xmlns:cfg="using:Mesen.Config"
|
|
xmlns:l="using:Mesen.Localization"
|
|
mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="550"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch"
|
|
x:DataType="vm:VideoConfigViewModel"
|
|
x:Class="Mesen.Views.VideoConfigView"
|
|
>
|
|
<Design.DataContext>
|
|
<vm:VideoConfigViewModel />
|
|
</Design.DataContext>
|
|
|
|
<UserControl.DataTemplates>
|
|
<DataTemplate DataType="{x:Type x:UInt32}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding}" />
|
|
<TextBlock Text=" Hz" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</UserControl.DataTemplates>
|
|
|
|
<TabControl TabStripPlacement="Top" SelectedIndex="0">
|
|
<TabItem Header="{l:Translate tpgGeneral}">
|
|
<ScrollViewer AllowAutoHide="False" HorizontalScrollBarVisibility="Auto" Padding="0 0 2 0">
|
|
<StackPanel>
|
|
<c:SystemSpecificSettings ConfigType="Video" />
|
|
|
|
<c:OptionSection Header="{l:Translate tpgGeneral}">
|
|
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto,Auto">
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="{l:Translate lblDisplayRatio}" />
|
|
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
|
|
<c:EnumComboBox SelectedItem="{Binding Config.AspectRatio}" MinWidth="230" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
Orientation="Horizontal"
|
|
IsVisible="{Binding Config.AspectRatio, Converter={StaticResource EnumMatchConverter}, ConverterParameter={x:Static cfg:VideoAspectRatio.Custom}}"
|
|
>
|
|
<TextBlock Text="{l:Translate lblCustomRatio}" VerticalAlignment="Center" />
|
|
<c:MesenNumericUpDown
|
|
Value="{Binding Config.CustomAspectRatio}"
|
|
FormatString="0.0000"
|
|
Minimum="0.1"
|
|
Maximum="5"
|
|
Increment="0.01"
|
|
VerticalAlignment="Center"
|
|
/>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding IsWindows10}">
|
|
<CheckBox
|
|
Content="{l:Translate chkEnableVariableRefreshRate}"
|
|
IsChecked="{Binding Config.EnableVariableRefreshRate}"
|
|
/>
|
|
<c:HelpTooltip Text="{l:Translate chkEnableVariableRefreshRateHint}" />
|
|
</StackPanel>
|
|
|
|
<CheckBox Content="{l:Translate chkIntegerFpsMode}" IsChecked="{Binding Config.IntegerFpsMode}" />
|
|
<CheckBox
|
|
Content="{l:Translate chkVerticalSync}"
|
|
IsVisible="{Binding !IsMacOs}"
|
|
IsEnabled="{Binding !Config.UseSoftwareRenderer}"
|
|
IsChecked="{Binding Config.VerticalSync}"
|
|
/>
|
|
|
|
<StackPanel IsVisible="{Binding IsWindows}">
|
|
<CheckBox
|
|
Content="{l:Translate chkUseExclusiveFullscreen}"
|
|
IsChecked="{Binding Config.UseExclusiveFullscreen}"
|
|
IsEnabled="{Binding !Config.UseSoftwareRenderer}"
|
|
/>
|
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding Config.UseExclusiveFullscreen}" Margin="35 3 0 10">
|
|
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto,Auto,Auto">
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="{l:Translate lblFullscreenResolution}" />
|
|
<c:EnumComboBox Grid.Row="0" Grid.Column="1" SelectedItem="{Binding Config.ExclusiveFullscreenResolution}" />
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="{l:Translate lblRequestedRefreshRateNtsc}" />
|
|
<ComboBox
|
|
Grid.Row="1" Grid.Column="1"
|
|
SelectedItem="{Binding Config.ExclusiveFullscreenRefreshRateNtsc}"
|
|
ItemsSource="{Binding AvailableRefreshRates}"
|
|
/>
|
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0" Text="{l:Translate lblRequestedRefreshRatePal}" />
|
|
<ComboBox
|
|
Grid.Row="2" Grid.Column="1"
|
|
SelectedItem="{Binding Config.ExclusiveFullscreenRefreshRatePal}"
|
|
ItemsSource="{Binding AvailableRefreshRates}"
|
|
/>
|
|
</Grid>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<CheckBox Content="{l:Translate chkFullscreenForceIntegerScale}" IsChecked="{Binding Config.FullscreenForceIntegerScale}" />
|
|
</c:OptionSection>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</TabItem>
|
|
<TabItem Header="{l:Translate tpgPicture}">
|
|
<ScrollViewer AllowAutoHide="False" HorizontalScrollBarVisibility="Auto" Padding="0 0 2 0">
|
|
<Grid ColumnDefinitions="1*,1*" RowDefinitions="Auto,*" Margin="0 2 0 0" MinWidth="350">
|
|
<c:GroupBox Grid.Column="0" Header="{l:Translate lblPictureSettings}" Margin="0 0 1 0">
|
|
<StackPanel>
|
|
<c:MesenSlider Value="{Binding Config.Brightness}" Text="{l:Translate trkBrightness}" Margin="5 3" Minimum="-100" Maximum="100" />
|
|
<c:MesenSlider Value="{Binding Config.Contrast}" Text="{l:Translate trkContrast}" Margin="5 3" Minimum="-100" Maximum="100" />
|
|
<c:MesenSlider Value="{Binding Config.Hue}" Text="{l:Translate trkHue}" Margin="5 3" Minimum="-100" Maximum="100" />
|
|
<c:MesenSlider Value="{Binding Config.Saturation}" Text="{l:Translate trkSaturation}" Margin="5 3" Minimum="-100" Maximum="100" />
|
|
<c:MesenSlider Value="{Binding Config.ScanlineIntensity}" Text="{l:Translate trkScanlines}" Margin="5 3" Minimum="0" Maximum="100" />
|
|
<CheckBox IsChecked="{Binding Config.UseBilinearInterpolation}" Content="{l:Translate chkBilinearInterpolation}" />
|
|
<CheckBox
|
|
Margin="15 0 0 0"
|
|
IsEnabled="{Binding Config.UseBilinearInterpolation}"
|
|
IsVisible="{Binding IsWindows}"
|
|
IsChecked="{Binding Config.UseSrgbTextureFormat}"
|
|
Content="{l:Translate chkUseSrgbTextureFormat}"
|
|
/>
|
|
</StackPanel>
|
|
</c:GroupBox>
|
|
|
|
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.Row="1" VerticalAlignment="Top">
|
|
<Button Content="{l:Translate btnSelectPreset}" Click="BtnPreset_OnClick">
|
|
<Button.ContextMenu>
|
|
<ContextMenu Placement="BottomEdgeAlignedLeft">
|
|
<MenuItem Header="{l:Translate mnuPresetComposite}" Command="{Binding PresetCompositeCommand}" />
|
|
<MenuItem Header="{l:Translate mnuPresetSVideo}" Command="{Binding PresetSVideoCommand}" />
|
|
<MenuItem Header="{l:Translate mnuPresetRgb}" Command="{Binding PresetRgbCommand}" />
|
|
<MenuItem Header="{l:Translate mnuPresetMonochrome}" Command="{Binding PresetMonochromeCommand}" />
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
</Button>
|
|
|
|
<Button Content="{l:Translate btnReset}" Command="{Binding ResetPictureSettingsCommand}" />
|
|
</StackPanel>
|
|
|
|
<c:GroupBox Grid.Column="1" Grid.RowSpan="2" Header="{l:Translate lblFilterSettings}" Margin="1 0 0 0">
|
|
<StackPanel>
|
|
<StackPanel.Styles>
|
|
<Style Selector="c|MesenSlider">
|
|
<Setter Property="Margin" Value="0 3 10 3" />
|
|
<Setter Property="Minimum" Value="-100" />
|
|
<Setter Property="Maximum" Value="100" />
|
|
</Style>
|
|
</StackPanel.Styles>
|
|
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
<TextBlock Text="{l:Translate lblVideoFilter}" VerticalAlignment="Center" />
|
|
<c:EnumComboBox Grid.Column="1" SelectedItem="{Binding Config.VideoFilter}" />
|
|
</Grid>
|
|
|
|
<c:OptionSection
|
|
Header="{l:Translate lblNtscBlarggSettings}"
|
|
IsVisible="{Binding Config.VideoFilter, Converter={StaticResource EnumMatchConverter}, ConverterParameter={x:Static cfg:VideoFilterType.NtscBlargg}}"
|
|
>
|
|
<c:MesenSlider Value="{Binding Config.NtscArtifacts}" Text="{l:Translate trkArtifacts}" />
|
|
<c:MesenSlider Value="{Binding Config.NtscBleed}" Text="{l:Translate trkBleed}" />
|
|
<c:MesenSlider Value="{Binding Config.NtscFringing}" Text="{l:Translate trkFringing}" />
|
|
<c:MesenSlider Value="{Binding Config.NtscGamma}" Text="{l:Translate trkGamma}" />
|
|
<c:MesenSlider Value="{Binding Config.NtscResolution}" Text="{l:Translate trkResolution}" />
|
|
<c:MesenSlider Value="{Binding Config.NtscSharpness}" Text="{l:Translate trkSharpness}" />
|
|
<CheckBox IsChecked="{Binding Config.NtscMergeFields}" Content="{l:Translate chkMergeFields}" />
|
|
</c:OptionSection>
|
|
|
|
<c:OptionSection
|
|
Header="{l:Translate lblNtscBisqwitSettings}"
|
|
IsVisible="{Binding Config.VideoFilter, Converter={StaticResource EnumMatchConverter}, ConverterParameter={x:Static cfg:VideoFilterType.NtscBisqwit}}"
|
|
>
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
<TextBlock Text="{l:Translate lblNtscFilterScale}" VerticalAlignment="Center" />
|
|
<c:EnumComboBox Grid.Column="1" SelectedItem="{Binding Config.NtscScale}" />
|
|
</Grid>
|
|
|
|
<c:MesenSlider Value="{Binding Config.NtscYFilterLength}" Text="{l:Translate trkNtscYFilterLength}" Minimum="-46" Maximum="400" TickFrequency="20" />
|
|
<c:MesenSlider Value="{Binding Config.NtscIFilterLength}" Text="{l:Translate trkNtscIFilterLength}" Minimum="0" Maximum="400" TickFrequency="20" />
|
|
<c:MesenSlider Value="{Binding Config.NtscQFilterLength}" Text="{l:Translate trkNtscQFilterLength}" Minimum="0" Maximum="400" TickFrequency="20" />
|
|
</c:OptionSection>
|
|
|
|
<c:OptionSection
|
|
Header="{l:Translate lblLcdGridSettings}"
|
|
IsVisible="{Binding Config.VideoFilter, Converter={StaticResource EnumMatchConverter}, ConverterParameter={x:Static cfg:VideoFilterType.LcdGrid}}"
|
|
>
|
|
<c:MesenSlider Value="{Binding Config.LcdGridTopLeftBrightness}" Text="{l:Translate trkLcdGridTopLeftBrightness}" Minimum="0" Maximum="100" TickFrequency="10" />
|
|
<c:MesenSlider Value="{Binding Config.LcdGridTopRightBrightness}" Text="{l:Translate trkLcdGridTopRightBrightness}" Minimum="0" Maximum="100" TickFrequency="10" />
|
|
<c:MesenSlider Value="{Binding Config.LcdGridBottomLeftBrightness}" Text="{l:Translate trkLcdGridBottomLeftBrightness}" Minimum="0" Maximum="100" TickFrequency="10" />
|
|
<c:MesenSlider Value="{Binding Config.LcdGridBottomRightBrightness}" Text="{l:Translate trkLcdGridBottomRightBrightness}" Minimum="0" Maximum="100" TickFrequency="10" />
|
|
</c:OptionSection>
|
|
</StackPanel>
|
|
</c:GroupBox>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</TabItem>
|
|
<TabItem Header="{l:Translate tpgAdvanced}">
|
|
<ScrollViewer AllowAutoHide="False" HorizontalScrollBarVisibility="Auto" Padding="0 0 2 0">
|
|
<StackPanel>
|
|
<c:CheckBoxWarning IsVisible="{Binding !IsMacOs}" IsChecked="{Binding Config.UseSoftwareRenderer}" Text="{l:Translate chkUseSoftwareRenderer}" />
|
|
<c:CheckBoxWarning IsChecked="{Binding Config.DisableHighPrecisionFramePacing}" Text="{l:Translate chkDisableHighPrecisionFramePacing}" />
|
|
<StackPanel Orientation="Horizontal" Margin="0 5 0 0">
|
|
<TextBlock Text="{l:Translate lblScreenRotation}" VerticalAlignment="Center" />
|
|
<c:EnumComboBox SelectedItem="{Binding Config.ScreenRotation}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</TabItem>
|
|
</TabControl>
|
|
</UserControl>
|