SettingsSystemView.axaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. <UserControl
  2. x:Class="Ryujinx.Ava.UI.Views.Settings.SettingsSystemView"
  3. xmlns="https://github.com/avaloniaui"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
  8. xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
  9. xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
  10. xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
  11. mc:Ignorable="d"
  12. x:DataType="viewModels:SettingsViewModel">
  13. <Design.DataContext>
  14. <viewModels:SettingsViewModel />
  15. </Design.DataContext>
  16. <ScrollViewer
  17. Name="SystemPage"
  18. HorizontalAlignment="Stretch"
  19. VerticalAlignment="Stretch"
  20. HorizontalScrollBarVisibility="Disabled"
  21. VerticalScrollBarVisibility="Auto">
  22. <Border Classes="settings">
  23. <StackPanel
  24. Margin="10"
  25. HorizontalAlignment="Stretch"
  26. Orientation="Vertical"
  27. Spacing="10">
  28. <TextBlock
  29. Classes="h1"
  30. Text="{ext:Locale SettingsTabSystemCore}" />
  31. <StackPanel
  32. Margin="10,0,0,0"
  33. Orientation="Vertical">
  34. <StackPanel
  35. Margin="0,0,0,10"
  36. Orientation="Horizontal">
  37. <TextBlock
  38. VerticalAlignment="Center"
  39. Text="{ext:Locale SettingsTabSystemSystemRegion}"
  40. Width="250" />
  41. <ComboBox
  42. SelectedIndex="{Binding Region}"
  43. ToolTip.Tip="{ext:Locale RegionTooltip}"
  44. HorizontalContentAlignment="Left"
  45. Width="350">
  46. <ComboBoxItem>
  47. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionJapan}" />
  48. </ComboBoxItem>
  49. <ComboBoxItem>
  50. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionUSA}" />
  51. </ComboBoxItem>
  52. <ComboBoxItem>
  53. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionEurope}" />
  54. </ComboBoxItem>
  55. <ComboBoxItem>
  56. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionAustralia}" />
  57. </ComboBoxItem>
  58. <ComboBoxItem>
  59. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionChina}" />
  60. </ComboBoxItem>
  61. <ComboBoxItem>
  62. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionKorea}" />
  63. </ComboBoxItem>
  64. <ComboBoxItem>
  65. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionTaiwan}" />
  66. </ComboBoxItem>
  67. </ComboBox>
  68. </StackPanel>
  69. <StackPanel
  70. Margin="0,0,0,10"
  71. Orientation="Horizontal">
  72. <TextBlock
  73. VerticalAlignment="Center"
  74. Text="{ext:Locale SettingsTabSystemSystemLanguage}"
  75. ToolTip.Tip="{ext:Locale LanguageTooltip}"
  76. Width="250" />
  77. <ComboBox
  78. SelectedIndex="{Binding Language}"
  79. ToolTip.Tip="{ext:Locale LanguageTooltip}"
  80. HorizontalContentAlignment="Left"
  81. Width="350">
  82. <ComboBoxItem>
  83. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageJapanese}" />
  84. </ComboBoxItem>
  85. <ComboBoxItem>
  86. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageAmericanEnglish}" />
  87. </ComboBoxItem>
  88. <ComboBoxItem>
  89. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageFrench}" />
  90. </ComboBoxItem>
  91. <ComboBoxItem>
  92. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageGerman}" />
  93. </ComboBoxItem>
  94. <ComboBoxItem>
  95. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageItalian}" />
  96. </ComboBoxItem>
  97. <ComboBoxItem>
  98. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageSpanish}" />
  99. </ComboBoxItem>
  100. <ComboBoxItem>
  101. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageChinese}" />
  102. </ComboBoxItem>
  103. <ComboBoxItem>
  104. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageKorean}" />
  105. </ComboBoxItem>
  106. <ComboBoxItem>
  107. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageDutch}" />
  108. </ComboBoxItem>
  109. <ComboBoxItem>
  110. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguagePortuguese}" />
  111. </ComboBoxItem>
  112. <ComboBoxItem>
  113. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageRussian}" />
  114. </ComboBoxItem>
  115. <ComboBoxItem>
  116. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageTaiwanese}" />
  117. </ComboBoxItem>
  118. <ComboBoxItem>
  119. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageBritishEnglish}" />
  120. </ComboBoxItem>
  121. <ComboBoxItem>
  122. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageCanadianFrench}" />
  123. </ComboBoxItem>
  124. <ComboBoxItem>
  125. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageLatinAmericanSpanish}" />
  126. </ComboBoxItem>
  127. <ComboBoxItem>
  128. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageSimplifiedChinese}" />
  129. </ComboBoxItem>
  130. <ComboBoxItem>
  131. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageTraditionalChinese}" />
  132. </ComboBoxItem>
  133. <ComboBoxItem>
  134. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageBrazilianPortuguese}" />
  135. </ComboBoxItem>
  136. <ComboBoxItem>
  137. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageSwedish}" />
  138. </ComboBoxItem>
  139. <ComboBoxItem>
  140. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageNorwegian}" />
  141. </ComboBoxItem>
  142. </ComboBox>
  143. </StackPanel>
  144. <StackPanel
  145. Margin="0,0,0,10"
  146. Orientation="Horizontal">
  147. <TextBlock
  148. VerticalAlignment="Center"
  149. Text="{ext:Locale SettingsTabSystemSystemTimeZone}"
  150. ToolTip.Tip="{ext:Locale TimezoneTooltip}"
  151. Width="250" />
  152. <AutoCompleteBox
  153. Name="TimeZoneBox"
  154. Width="350"
  155. MaxDropDownHeight="500"
  156. FilterMode="Contains"
  157. ItemsSource="{Binding TimeZones}"
  158. SelectionChanged="TimeZoneBox_OnSelectionChanged"
  159. Text="{Binding Path=TimeZone, Mode=OneWay}"
  160. TextChanged="TimeZoneBox_OnTextChanged"
  161. ToolTip.Tip="{ext:Locale TimezoneTooltip}"
  162. ValueMemberBinding="{Binding Mode=OneWay, Converter={x:Static helpers:TimeZoneConverter.Instance}}" />
  163. </StackPanel>
  164. <StackPanel
  165. Margin="0,0,0,10"
  166. Orientation="Horizontal">
  167. <TextBlock
  168. VerticalAlignment="Center"
  169. Text="{ext:Locale SettingsTabSystemSystemTime}"
  170. ToolTip.Tip="{ext:Locale TimeTooltip}"
  171. Width="250"/>
  172. <DatePicker
  173. VerticalAlignment="Center"
  174. IsEnabled="{Binding !MatchSystemTime}"
  175. SelectedDate="{Binding CurrentDate}"
  176. ToolTip.Tip="{ext:Locale TimeTooltip}"
  177. Width="350" />
  178. </StackPanel>
  179. <StackPanel
  180. Margin="250,0,0,10"
  181. Orientation="Horizontal">
  182. <TimePicker
  183. VerticalAlignment="Center"
  184. ClockIdentifier="24HourClock"
  185. IsEnabled="{Binding !MatchSystemTime}"
  186. SelectedTime="{Binding CurrentTime}"
  187. Width="350"
  188. ToolTip.Tip="{ext:Locale TimeTooltip}" />
  189. </StackPanel>
  190. <StackPanel Orientation="Horizontal">
  191. <TextBlock
  192. VerticalAlignment="Center"
  193. Text="{ext:Locale SettingsTabSystemSystemTimeMatch}"
  194. ToolTip.Tip="{ext:Locale MatchTimeTooltip}"
  195. Width="250"/>
  196. <CheckBox
  197. VerticalAlignment="Center"
  198. IsChecked="{Binding MatchSystemTime}"
  199. ToolTip.Tip="{ext:Locale MatchTimeTooltip}"/>
  200. </StackPanel>
  201. <Separator />
  202. <StackPanel Margin="0,10,0,10"
  203. Orientation="Horizontal">
  204. <TextBlock
  205. VerticalAlignment="Center"
  206. Text="{ext:Locale SettingsTabSystemVSyncMode}"
  207. ToolTip.Tip="{ext:Locale SettingsTabSystemVSyncModeTooltip}"
  208. Width="250" />
  209. <ComboBox
  210. IsVisible="{Binding EnableCustomVSyncInterval}"
  211. SelectedIndex="{Binding VSyncMode}"
  212. ToolTip.Tip="{ext:Locale SettingsTabSystemVSyncModeTooltipCustom}"
  213. HorizontalContentAlignment="Left"
  214. Width="350">
  215. <ComboBoxItem>
  216. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeSwitch}" />
  217. </ComboBoxItem>
  218. <ComboBoxItem>
  219. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeUnbounded}" />
  220. </ComboBoxItem>
  221. <ComboBoxItem>
  222. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeCustom}" />
  223. </ComboBoxItem>
  224. </ComboBox>
  225. <ComboBox
  226. IsVisible="{Binding !EnableCustomVSyncInterval}"
  227. SelectedIndex="{Binding VSyncMode}"
  228. ToolTip.Tip="{ext:Locale SettingsTabSystemVSyncModeTooltip}"
  229. HorizontalContentAlignment="Left"
  230. Width="350">
  231. <ComboBoxItem>
  232. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeSwitch}" />
  233. </ComboBoxItem>
  234. <ComboBoxItem>
  235. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeUnbounded}" />
  236. </ComboBoxItem>
  237. </ComboBox>
  238. </StackPanel>
  239. <StackPanel IsVisible="{Binding EnableCustomVSyncInterval}"
  240. Margin="0,0,0,10"
  241. Orientation="Horizontal">
  242. <TextBlock
  243. VerticalAlignment="Center"
  244. Text="{ext:Locale SettingsTabSystemCustomVSyncIntervalPercentage}"
  245. ToolTip.Tip="{ext:Locale SettingsTabSystemCustomVSyncIntervalValueTooltip}"
  246. Width="250" />
  247. <Slider Value="{Binding CustomVSyncIntervalPercentageProxy}"
  248. ToolTip.Tip="{ext:Locale SettingsTabSystemCustomVSyncIntervalSliderTooltip}"
  249. MinWidth="175"
  250. Margin="10,-3,0,0"
  251. Height="32"
  252. Padding="0,-5"
  253. TickFrequency="1"
  254. IsSnapToTickEnabled="True"
  255. LargeChange="10"
  256. SmallChange="1"
  257. VerticalAlignment="Center"
  258. Minimum="10"
  259. Maximum="400" />
  260. <TextBlock Margin="5,0"
  261. Width="40"
  262. Text="{Binding CustomVSyncIntervalPercentageText}"/>
  263. </StackPanel>
  264. <CheckBox IsChecked="{Binding EnableFsIntegrityChecks}">
  265. <TextBlock
  266. Text="{ext:Locale SettingsTabSystemEnableFsIntegrityChecks}"
  267. ToolTip.Tip="{ext:Locale FsIntegrityToggleTooltip}" />
  268. </CheckBox>
  269. </StackPanel>
  270. <Separator Height="1" />
  271. <StackPanel
  272. Orientation="Vertical"
  273. Spacing="5">
  274. <TextBlock
  275. Classes="h1"
  276. Text="{ext:Locale SettingsTabSystemHacks}" />
  277. <TextBlock
  278. Foreground="{DynamicResource SecondaryTextColor}"
  279. TextDecorations="Underline"
  280. Text="{ext:Locale SettingsTabSystemHacksNote}" />
  281. </StackPanel>
  282. <StackPanel
  283. Margin="10,0,0,0"
  284. Orientation="Horizontal">
  285. <TextBlock
  286. VerticalAlignment="Center"
  287. Text="{ext:Locale SettingsTabSystemDramSize}"
  288. Width="250" />
  289. <ComboBox
  290. SelectedIndex="{Binding DramSize}"
  291. ToolTip.Tip="{ext:Locale DRamTooltip}"
  292. HorizontalContentAlignment="Left"
  293. Width="350">
  294. <ComboBoxItem>
  295. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize4GiB}" />
  296. </ComboBoxItem>
  297. <ComboBoxItem>
  298. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize6GiB}" />
  299. </ComboBoxItem>
  300. <ComboBoxItem>
  301. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize8GiB}" />
  302. </ComboBoxItem>
  303. <ComboBoxItem>
  304. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize12GiB}" />
  305. </ComboBoxItem>
  306. </ComboBox>
  307. </StackPanel>
  308. <StackPanel
  309. Margin="10,0,0,0"
  310. HorizontalAlignment="Stretch"
  311. Orientation="Vertical">
  312. <CheckBox
  313. IsChecked="{Binding IgnoreMissingServices}"
  314. ToolTip.Tip="{ext:Locale IgnoreMissingServicesTooltip}">
  315. <TextBlock Text="{ext:Locale SettingsTabSystemIgnoreMissingServices}" />
  316. </CheckBox>
  317. <CheckBox
  318. IsChecked="{Binding IgnoreApplet}"
  319. ToolTip.Tip="{ext:Locale IgnoreControllerAppletTooltip}">
  320. <TextBlock Text="{ext:Locale SettingsTabSystemIgnoreControllerApplet}" />
  321. </CheckBox>
  322. <CheckBox
  323. IsChecked="{Binding EnableCustomVSyncInterval}"
  324. ToolTip.Tip="{ext:Locale SettingsTabSystemEnableCustomVSyncIntervalTooltip}">
  325. <TextBlock Text="{ext:Locale SettingsTabSystemEnableCustomVSyncInterval}" />
  326. </CheckBox>
  327. </StackPanel>
  328. </StackPanel>
  329. </Border>
  330. </ScrollViewer>
  331. </UserControl>