mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-27 03:47:11 +02:00
Replace 'Expand DRAM' option with dropdown menu (#32)
Allows to use mods that require a larger memory pool to allocate from.
This commit is contained in:
parent
0f3c7f920b
commit
f76a97c976
54 changed files with 416 additions and 118 deletions
|
@ -136,7 +136,7 @@ namespace Ryujinx.Ava.UI.Applet
|
|||
_hiddenTextBox.CaretIndex = cursorBegin;
|
||||
});
|
||||
|
||||
public void SetText(string text, int cursorBegin, int cursorEnd) =>
|
||||
public void SetText(string text, int cursorBegin, int cursorEnd) =>
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
_hiddenTextBox.Text = text;
|
||||
|
|
|
@ -224,7 +224,7 @@ namespace Ryujinx.Ava.UI.Controls
|
|||
{
|
||||
if (sender is not MenuItem { DataContext: MainWindowViewModel { SelectedApplication: not null } viewModel })
|
||||
return;
|
||||
|
||||
|
||||
string ptcDir = Path.Combine(AppDataManager.GamesDirPath, viewModel.SelectedApplication.IdString, "cache", "cpu");
|
||||
string mainDir = Path.Combine(ptcDir, "0");
|
||||
string backupDir = Path.Combine(ptcDir, "1");
|
||||
|
|
|
@ -199,7 +199,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
string secondaryText,
|
||||
string acceptButton,
|
||||
string closeButton,
|
||||
string title)
|
||||
string title)
|
||||
=> ShowTextDialog(
|
||||
title,
|
||||
primary,
|
||||
|
@ -215,7 +215,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
string acceptButtonText,
|
||||
string cancelButtonText,
|
||||
string title,
|
||||
UserResult primaryButtonResult = UserResult.Yes)
|
||||
UserResult primaryButtonResult = UserResult.Yes)
|
||||
=> await ShowTextDialog(
|
||||
string.IsNullOrWhiteSpace(title) ? LocaleManager.Instance[LocaleKeys.DialogConfirmationTitle] : title,
|
||||
primaryText,
|
||||
|
@ -226,7 +226,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
(int)Symbol.Help,
|
||||
primaryButtonResult);
|
||||
|
||||
internal static async Task<UserResult> CreateLocalizedConfirmationDialog(string primaryText, string secondaryText)
|
||||
internal static async Task<UserResult> CreateLocalizedConfirmationDialog(string primaryText, string secondaryText)
|
||||
=> await CreateConfirmationDialog(
|
||||
primaryText,
|
||||
secondaryText,
|
||||
|
@ -234,7 +234,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
LocaleManager.Instance[LocaleKeys.InputDialogNo],
|
||||
LocaleManager.Instance[LocaleKeys.RyujinxConfirm]);
|
||||
|
||||
internal static async Task CreateUpdaterInfoDialog(string primary, string secondaryText)
|
||||
internal static async Task CreateUpdaterInfoDialog(string primary, string secondaryText)
|
||||
=> await ShowTextDialog(
|
||||
LocaleManager.Instance[LocaleKeys.DialogUpdaterTitle],
|
||||
primary,
|
||||
|
@ -244,7 +244,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
LocaleManager.Instance[LocaleKeys.InputDialogOk],
|
||||
(int)Symbol.Important);
|
||||
|
||||
internal static async Task CreateWarningDialog(string primary, string secondaryText)
|
||||
internal static async Task CreateWarningDialog(string primary, string secondaryText)
|
||||
=> await ShowTextDialog(
|
||||
LocaleManager.Instance[LocaleKeys.DialogWarningTitle],
|
||||
primary,
|
||||
|
|
|
@ -39,8 +39,8 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
|
||||
await ContentDialogHelper.CreateInfoDialog(
|
||||
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogUserErrorDialogMessage, errorCode, GetErrorTitle(error)),
|
||||
GetErrorDescription(error),
|
||||
"",
|
||||
GetErrorDescription(error),
|
||||
"",
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogOk],
|
||||
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogUserErrorDialogTitle, errorCode));
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||
|
||||
private PlayerIndex _playerId;
|
||||
private int _controller;
|
||||
private int _controllerNumber;
|
||||
private readonly int _controllerNumber;
|
||||
private string _controllerImage;
|
||||
private int _device;
|
||||
private object _configViewModel;
|
||||
|
|
|
@ -913,7 +913,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
|
||||
public KeyGesture PauseKey
|
||||
{
|
||||
get => KeyGesture.Parse(_pauseKey);
|
||||
get => KeyGesture.Parse(_pauseKey);
|
||||
set
|
||||
{
|
||||
_pauseKey = value.ToString();
|
||||
|
|
|
@ -14,6 +14,7 @@ using Ryujinx.Common.Configuration.Multiplayer;
|
|||
using Ryujinx.Common.GraphicsDriver;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Graphics.Vulkan;
|
||||
using Ryujinx.HLE;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using Ryujinx.HLE.HOS.Services.Time.TimeZone;
|
||||
using Ryujinx.UI.Common.Configuration;
|
||||
|
@ -154,7 +155,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
public bool EnableInternetAccess { get; set; }
|
||||
public bool EnableFsIntegrityChecks { get; set; }
|
||||
public bool IgnoreMissingServices { get; set; }
|
||||
public bool ExpandDramSize { get; set; }
|
||||
public MemoryConfiguration DramSize { get; set; }
|
||||
public bool EnableShaderCache { get; set; }
|
||||
public bool EnableTextureRecompression { get; set; }
|
||||
public bool EnableMacroHLE { get; set; }
|
||||
|
@ -444,7 +445,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
|
||||
EnableVsync = config.Graphics.EnableVsync;
|
||||
EnableFsIntegrityChecks = config.System.EnableFsIntegrityChecks;
|
||||
ExpandDramSize = config.System.ExpandRam;
|
||||
DramSize = config.System.DramSize;
|
||||
IgnoreMissingServices = config.System.IgnoreMissingServices;
|
||||
|
||||
// CPU
|
||||
|
@ -545,7 +546,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
config.System.SystemTimeOffset.Value = Convert.ToInt64((CurrentDate.ToUnixTimeSeconds() + CurrentTime.TotalSeconds) - DateTimeOffset.Now.ToUnixTimeSeconds());
|
||||
config.Graphics.EnableVsync.Value = EnableVsync;
|
||||
config.System.EnableFsIntegrityChecks.Value = EnableFsIntegrityChecks;
|
||||
config.System.ExpandRam.Value = ExpandDramSize;
|
||||
config.System.DramSize.Value = DramSize;
|
||||
config.System.IgnoreMissingServices.Value = IgnoreMissingServices;
|
||||
|
||||
// CPU
|
||||
|
|
|
@ -143,14 +143,14 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||
}
|
||||
}
|
||||
|
||||
public async void OpenAmiiboWindow(object sender, RoutedEventArgs e)
|
||||
public async void OpenAmiiboWindow(object sender, RoutedEventArgs e)
|
||||
=> await ViewModel.OpenAmiiboWindow();
|
||||
|
||||
public async void OpenCheatManagerForCurrentApp(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!ViewModel.IsGameRunning)
|
||||
return;
|
||||
|
||||
|
||||
string name = ViewModel.AppHost.Device.Processes.ActiveApplication.ApplicationControlProperties.Title[(int)ViewModel.AppHost.Device.System.State.DesiredTitleLanguage].NameString.ToString();
|
||||
|
||||
await new CheatWindow(
|
||||
|
@ -186,7 +186,8 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||
|
||||
private async void ChangeWindowSize_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is not MenuItem { Tag: string resolution }) return;
|
||||
if (sender is not MenuItem { Tag: string resolution })
|
||||
return;
|
||||
|
||||
(int height, int width) = resolution.Split(' ')
|
||||
.Into(parts => (int.Parse(parts[0]), int.Parse(parts[1])));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<UserControl
|
||||
<UserControl
|
||||
x:Class="Ryujinx.Ava.UI.Views.Settings.SettingsSystemView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
|
@ -203,15 +203,36 @@
|
|||
Foreground="{DynamicResource SecondaryTextColor}"
|
||||
Text="{locale:Locale SettingsTabSystemHacksNote}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Margin="10,0,0,0"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
Text="{locale:Locale SettingsTabSystemDramSize}"
|
||||
Width="250" />
|
||||
<ComboBox
|
||||
SelectedIndex="{Binding DramSize}"
|
||||
ToolTip.Tip="{locale:Locale DRamTooltip}"
|
||||
HorizontalContentAlignment="Left"
|
||||
Width="350">
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{locale:Locale SettingsTabSystemDramSize4GiB}" />
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{locale:Locale SettingsTabSystemDramSize6GiB}" />
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{locale:Locale SettingsTabSystemDramSize8GiB}" />
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{locale:Locale SettingsTabSystemDramSize12GiB}" />
|
||||
</ComboBoxItem>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Margin="10,0,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Orientation="Vertical">
|
||||
<CheckBox
|
||||
IsChecked="{Binding ExpandDramSize}"
|
||||
ToolTip.Tip="{locale:Locale DRamTooltip}">
|
||||
<TextBlock Text="{locale:Locale SettingsTabSystemExpandDramSize}" />
|
||||
</CheckBox>
|
||||
<CheckBox
|
||||
IsChecked="{Binding IgnoreMissingServices}"
|
||||
ToolTip.Tip="{locale:Locale IgnoreMissingServicesTooltip}">
|
||||
|
@ -221,4 +242,4 @@
|
|||
</StackPanel>
|
||||
</Border>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
|
||||
TitleBar.ExtendsContentIntoTitleBar = true;
|
||||
TitleBar.TitleBarHitTestType = TitleBarHitTestType.Complex;
|
||||
|
||||
|
||||
|
||||
// NOTE: Height of MenuBar and StatusBar is not usable here, since it would still be 0 at this point.
|
||||
StatusBarHeight = StatusBarView.StatusBar.MinHeight;
|
||||
|
@ -665,8 +665,9 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
? string.Format(LocaleManager.Instance[LocaleKeys.AutoloadUpdateAddedMessage], numUpdatesAdded)
|
||||
: null;
|
||||
|
||||
if (msg is null) return;
|
||||
|
||||
if (msg is null)
|
||||
return;
|
||||
|
||||
|
||||
Dispatcher.UIThread.InvokeAsync(async () =>
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue