SettingsSystemView.axaml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  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. </ComboBox>
  137. </StackPanel>
  138. <StackPanel
  139. Margin="0,0,0,10"
  140. Orientation="Horizontal">
  141. <TextBlock
  142. VerticalAlignment="Center"
  143. Text="{ext:Locale SettingsTabSystemSystemTimeZone}"
  144. ToolTip.Tip="{ext:Locale TimezoneTooltip}"
  145. Width="250" />
  146. <AutoCompleteBox
  147. Name="TimeZoneBox"
  148. Width="350"
  149. MaxDropDownHeight="500"
  150. FilterMode="Contains"
  151. ItemsSource="{Binding TimeZones}"
  152. SelectionChanged="TimeZoneBox_OnSelectionChanged"
  153. Text="{Binding Path=TimeZone, Mode=OneWay}"
  154. TextChanged="TimeZoneBox_OnTextChanged"
  155. ToolTip.Tip="{ext:Locale TimezoneTooltip}"
  156. ValueMemberBinding="{Binding Mode=OneWay, Converter={x:Static helpers:TimeZoneConverter.Instance}}" />
  157. </StackPanel>
  158. <StackPanel
  159. Margin="0,0,0,10"
  160. Orientation="Horizontal">
  161. <TextBlock
  162. VerticalAlignment="Center"
  163. Text="{ext:Locale SettingsTabSystemSystemTime}"
  164. ToolTip.Tip="{ext:Locale TimeTooltip}"
  165. Width="250"/>
  166. <DatePicker
  167. VerticalAlignment="Center"
  168. IsEnabled="{Binding !MatchSystemTime}"
  169. SelectedDate="{Binding CurrentDate}"
  170. ToolTip.Tip="{ext:Locale TimeTooltip}"
  171. Width="350" />
  172. </StackPanel>
  173. <StackPanel
  174. Margin="250,0,0,10"
  175. Orientation="Horizontal">
  176. <TimePicker
  177. VerticalAlignment="Center"
  178. ClockIdentifier="24HourClock"
  179. IsEnabled="{Binding !MatchSystemTime}"
  180. SelectedTime="{Binding CurrentTime}"
  181. Width="350"
  182. ToolTip.Tip="{ext:Locale TimeTooltip}" />
  183. </StackPanel>
  184. <StackPanel Orientation="Horizontal">
  185. <TextBlock
  186. VerticalAlignment="Center"
  187. Text="{ext:Locale SettingsTabSystemSystemTimeMatch}"
  188. ToolTip.Tip="{ext:Locale MatchTimeTooltip}"
  189. Width="250"/>
  190. <CheckBox
  191. VerticalAlignment="Center"
  192. IsChecked="{Binding MatchSystemTime}"
  193. ToolTip.Tip="{ext:Locale MatchTimeTooltip}"/>
  194. </StackPanel>
  195. <Separator />
  196. <StackPanel Margin="0,10,0,10"
  197. Orientation="Horizontal">
  198. <TextBlock
  199. VerticalAlignment="Center"
  200. Text="{ext:Locale SettingsTabSystemVSyncMode}"
  201. ToolTip.Tip="{ext:Locale SettingsTabSystemVSyncModeTooltip}"
  202. Width="250" />
  203. <ComboBox
  204. IsVisible="{Binding EnableCustomVSyncInterval}"
  205. SelectedIndex="{Binding VSyncMode}"
  206. ToolTip.Tip="{ext:Locale SettingsTabSystemVSyncModeTooltipCustom}"
  207. HorizontalContentAlignment="Left"
  208. Width="350">
  209. <ComboBoxItem>
  210. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeSwitch}" />
  211. </ComboBoxItem>
  212. <ComboBoxItem>
  213. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeUnbounded}" />
  214. </ComboBoxItem>
  215. <ComboBoxItem>
  216. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeCustom}" />
  217. </ComboBoxItem>
  218. </ComboBox>
  219. <ComboBox
  220. IsVisible="{Binding !EnableCustomVSyncInterval}"
  221. SelectedIndex="{Binding VSyncMode}"
  222. ToolTip.Tip="{ext:Locale SettingsTabSystemVSyncModeTooltip}"
  223. HorizontalContentAlignment="Left"
  224. Width="350">
  225. <ComboBoxItem>
  226. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeSwitch}" />
  227. </ComboBoxItem>
  228. <ComboBoxItem>
  229. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeUnbounded}" />
  230. </ComboBoxItem>
  231. </ComboBox>
  232. </StackPanel>
  233. <StackPanel IsVisible="{Binding EnableCustomVSyncInterval}"
  234. Margin="0,0,0,10"
  235. Orientation="Horizontal">
  236. <TextBlock
  237. VerticalAlignment="Center"
  238. Text="{ext:Locale SettingsTabSystemCustomVSyncIntervalPercentage}"
  239. ToolTip.Tip="{ext:Locale SettingsTabSystemCustomVSyncIntervalValueTooltip}"
  240. Width="250" />
  241. <Slider Value="{Binding CustomVSyncIntervalPercentageProxy}"
  242. ToolTip.Tip="{ext:Locale SettingsTabSystemCustomVSyncIntervalSliderTooltip}"
  243. MinWidth="175"
  244. Margin="10,-3,0,0"
  245. Height="32"
  246. Padding="0,-5"
  247. TickFrequency="1"
  248. IsSnapToTickEnabled="True"
  249. LargeChange="10"
  250. SmallChange="1"
  251. VerticalAlignment="Center"
  252. Minimum="10"
  253. Maximum="400" />
  254. <TextBlock Margin="5,0"
  255. Width="40"
  256. Text="{Binding CustomVSyncIntervalPercentageText}"/>
  257. </StackPanel>
  258. <CheckBox IsChecked="{Binding EnableFsIntegrityChecks}">
  259. <TextBlock
  260. Text="{ext:Locale SettingsTabSystemEnableFsIntegrityChecks}"
  261. ToolTip.Tip="{ext:Locale FsIntegrityToggleTooltip}" />
  262. </CheckBox>
  263. </StackPanel>
  264. <Separator Height="1" />
  265. <StackPanel
  266. Orientation="Vertical"
  267. Spacing="5">
  268. <TextBlock
  269. Classes="h1"
  270. Text="{ext:Locale SettingsTabSystemHacks}" />
  271. <TextBlock
  272. Foreground="{DynamicResource SecondaryTextColor}"
  273. TextDecorations="Underline"
  274. Text="{ext:Locale SettingsTabSystemHacksNote}" />
  275. </StackPanel>
  276. <StackPanel
  277. Margin="10,0,0,0"
  278. Orientation="Horizontal">
  279. <TextBlock
  280. VerticalAlignment="Center"
  281. Text="{ext:Locale SettingsTabSystemDramSize}"
  282. Width="250" />
  283. <ComboBox
  284. SelectedIndex="{Binding DramSize}"
  285. ToolTip.Tip="{ext:Locale DRamTooltip}"
  286. HorizontalContentAlignment="Left"
  287. Width="350">
  288. <ComboBoxItem>
  289. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize4GiB}" />
  290. </ComboBoxItem>
  291. <ComboBoxItem>
  292. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize6GiB}" />
  293. </ComboBoxItem>
  294. <ComboBoxItem>
  295. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize8GiB}" />
  296. </ComboBoxItem>
  297. <ComboBoxItem>
  298. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize12GiB}" />
  299. </ComboBoxItem>
  300. </ComboBox>
  301. </StackPanel>
  302. <StackPanel
  303. Margin="10,0,0,0"
  304. HorizontalAlignment="Stretch"
  305. Orientation="Vertical">
  306. <CheckBox
  307. IsChecked="{Binding IgnoreMissingServices}"
  308. ToolTip.Tip="{ext:Locale IgnoreMissingServicesTooltip}">
  309. <TextBlock Text="{ext:Locale SettingsTabSystemIgnoreMissingServices}" />
  310. </CheckBox>
  311. <CheckBox
  312. IsChecked="{Binding IgnoreApplet}"
  313. ToolTip.Tip="{ext:Locale IgnoreControllerAppletTooltip}">
  314. <TextBlock Text="{ext:Locale SettingsTabSystemIgnoreControllerApplet}" />
  315. </CheckBox>
  316. <CheckBox
  317. IsChecked="{Binding EnableCustomVSyncInterval}"
  318. ToolTip.Tip="{ext:Locale SettingsTabSystemEnableCustomVSyncIntervalTooltip}">
  319. <TextBlock Text="{ext:Locale SettingsTabSystemEnableCustomVSyncInterval}" />
  320. </CheckBox>
  321. </StackPanel>
  322. </StackPanel>
  323. </Border>
  324. </ScrollViewer>
  325. </UserControl>