Compare commits
3 Commits
Canary-1.2
...
0d9a4fe48c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d9a4fe48c | ||
|
|
6c13e94c93 | ||
|
|
3e69afd110 |
@@ -42,7 +42,7 @@
|
||||
<PackageVersion Include="Ryujinx.Graphics.Nvdec.Dependencies" Version="5.0.3-build14" />
|
||||
<PackageVersion Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Version="1.2.0" />
|
||||
<PackageVersion Include="Ryujinx.SDL2-CS" Version="2.30.0-build32" />
|
||||
<PackageVersion Include="Gommon" Version="2.7.1.1" />
|
||||
<PackageVersion Include="Gommon" Version="2.7.1" />
|
||||
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
|
||||
<PackageVersion Include="Sep" Version="0.6.0" />
|
||||
<PackageVersion Include="shaderc.net" Version="0.1.0" />
|
||||
|
||||
@@ -4647,6 +4647,56 @@
|
||||
"zh_TW": "正體中文 (建議)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "SettingsTabSystemSystemLanguageSwedish",
|
||||
"Translations": {
|
||||
"ar_SA": "",
|
||||
"de_DE": "",
|
||||
"el_GR": "",
|
||||
"en_US": "Swedish",
|
||||
"es_ES": "",
|
||||
"fr_FR": "",
|
||||
"he_IL": "",
|
||||
"it_IT": "",
|
||||
"ja_JP": "",
|
||||
"ko_KR": "스웨덴어",
|
||||
"no_NO": "Svensk",
|
||||
"pl_PL": "",
|
||||
"pt_BR": "Sueco",
|
||||
"ru_RU": "",
|
||||
"sv_SE": "Svenska",
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "瑞典语",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "SettingsTabSystemSystemLanguageNorwegian",
|
||||
"Translations": {
|
||||
"ar_SA": "",
|
||||
"de_DE": "",
|
||||
"el_GR": "",
|
||||
"en_US": "Norwegian",
|
||||
"es_ES": "",
|
||||
"fr_FR": "",
|
||||
"he_IL": "",
|
||||
"it_IT": "",
|
||||
"ja_JP": "",
|
||||
"ko_KR": "노르웨이어",
|
||||
"no_NO": "Norsk",
|
||||
"pl_PL": "",
|
||||
"pt_BR": "Norueguês",
|
||||
"ru_RU": "",
|
||||
"sv_SE": "Norska",
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "挪威语",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "SettingsTabSystemSystemTimeZone",
|
||||
"Translations": {
|
||||
@@ -24073,4 +24123,4 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
[ObservableProperty] private object _configViewModel;
|
||||
[ObservableProperty] private string _profileName;
|
||||
private bool _isLoaded;
|
||||
public bool InitInputPage { get; set; }
|
||||
|
||||
private static readonly InputConfigJsonSerializerContext _serializerContext = new(JsonHelper.GetDefaultSerializerOptions());
|
||||
|
||||
@@ -92,6 +93,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
public bool CanClearLed => SelectedGamepad.Name.ContainsIgnoreCase("DualSense");
|
||||
|
||||
public bool IsModified { get; set; }
|
||||
public bool IsInputConfigChanged { get; set; }
|
||||
|
||||
public event Action NotifyChangesEvent;
|
||||
|
||||
public PlayerIndex PlayerIdChoose
|
||||
@@ -121,13 +124,12 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
|
||||
}
|
||||
_isLoaded = false;
|
||||
|
||||
LoadConfiguration();
|
||||
LoadDevice();
|
||||
LoadProfiles();
|
||||
|
||||
_isLoaded = true;
|
||||
|
||||
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
@@ -296,7 +298,10 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
{
|
||||
ConfigViewModel = new ControllerInputViewModel(this, new GamepadInputConfig(controllerInputConfig));
|
||||
}
|
||||
}
|
||||
|
||||
IsInputConfigChanged |= InitInputPage; // If the field has been changed, the control settings will be overwritten
|
||||
InitInputPage = true; // initialization variable
|
||||
}
|
||||
|
||||
public void LoadDevice()
|
||||
{
|
||||
@@ -817,6 +822,13 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
{
|
||||
IsModified = false;
|
||||
|
||||
if (!IsInputConfigChanged)
|
||||
{
|
||||
return; //If the input settings were not touched, then do nothing
|
||||
}
|
||||
|
||||
IsInputConfigChanged = false; // Input settings have been changed
|
||||
|
||||
List<InputConfig> newConfig = [];
|
||||
|
||||
newConfig.AddRange(ConfigurationState.Instance.Hid.InputConfig.Value);
|
||||
|
||||
@@ -793,7 +793,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
return false;
|
||||
}
|
||||
|
||||
public async Task HandleFirmwareInstallation(string filename)
|
||||
private async Task HandleFirmwareInstallation(string filename)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -65,6 +65,9 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
if (!float.IsNaN(_changeSlider) && _changeSlider != (float)check.Value)
|
||||
{
|
||||
(DataContext as ControllerInputViewModel)!.ParentModel.IsModified = true;
|
||||
|
||||
FlagInputConfigChanged();
|
||||
|
||||
_changeSlider = (float)check.Value;
|
||||
}
|
||||
}
|
||||
@@ -75,6 +78,9 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
if (sender is CheckBox { IsPointerOver: true })
|
||||
{
|
||||
(DataContext as ControllerInputViewModel)!.ParentModel.IsModified = true;
|
||||
|
||||
FlagInputConfigChanged();
|
||||
|
||||
_currentAssigner?.Cancel();
|
||||
_currentAssigner = null;
|
||||
}
|
||||
@@ -102,6 +108,8 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
|
||||
PointerPressed += MouseClick;
|
||||
|
||||
FlagInputConfigChanged();
|
||||
|
||||
ControllerInputViewModel viewModel = (DataContext as ControllerInputViewModel);
|
||||
|
||||
IKeyboard keyboard =
|
||||
@@ -208,6 +216,11 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
}
|
||||
}
|
||||
|
||||
private void FlagInputConfigChanged()
|
||||
{
|
||||
(DataContext as ControllerInputViewModel)!.ParentModel.IsInputConfigChanged = true;
|
||||
}
|
||||
|
||||
private void MouseClick(object sender, PointerPressedEventArgs e)
|
||||
{
|
||||
bool shouldUnbind = e.GetCurrentPoint(this).Properties.IsMiddleButtonPressed;
|
||||
@@ -239,7 +252,6 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
{
|
||||
gamepad?.ClearLed();
|
||||
}
|
||||
|
||||
_currentAssigner?.Cancel();
|
||||
_currentAssigner = null;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
|
||||
if (result == UserResult.Yes)
|
||||
{
|
||||
ViewModel.InitInputPage = false;
|
||||
ViewModel.Save();
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
|
||||
PointerPressed += MouseClick;
|
||||
|
||||
FlagInputConfigChanged();
|
||||
|
||||
if (DataContext is not KeyboardInputViewModel viewModel)
|
||||
return;
|
||||
|
||||
@@ -184,6 +186,11 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
}
|
||||
}
|
||||
|
||||
private void FlagInputConfigChanged()
|
||||
{
|
||||
(DataContext as KeyboardInputViewModel)!.ParentModel.IsInputConfigChanged = true;
|
||||
}
|
||||
|
||||
private void MouseClick(object sender, PointerPressedEventArgs e)
|
||||
{
|
||||
bool shouldUnbind = e.GetCurrentPoint(this).Properties.IsMiddleButtonPressed;
|
||||
|
||||
@@ -133,6 +133,12 @@
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageBrazilianPortuguese}" />
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageSwedish}" />
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem>
|
||||
<TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageNorwegian}" />
|
||||
</ComboBoxItem>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
|
||||
@@ -139,21 +139,8 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
base.OnApplyTemplate(e);
|
||||
|
||||
NotificationHelper.SetNotificationManager(this);
|
||||
|
||||
Executor.ExecuteBackgroundAsync(async () =>
|
||||
{
|
||||
await ShowIntelMacWarningAsync();
|
||||
FilePath firmwarePath = CommandLineState.FirmwareToInstallPathArg;
|
||||
if (firmwarePath is not null)
|
||||
{
|
||||
if ((firmwarePath.ExistsAsFile && firmwarePath.Extension is "xci" or "zip") ||
|
||||
firmwarePath.ExistsAsDirectory)
|
||||
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||
ViewModel.HandleFirmwareInstallation(firmwarePath));
|
||||
else
|
||||
Logger.Notice.Print(LogClass.UI, "Invalid firmware type provided. Path must be a directory, or a .zip or .xci file.");
|
||||
}
|
||||
});
|
||||
|
||||
Executor.ExecuteBackgroundAsync(ShowIntelMacWarningAsync);
|
||||
}
|
||||
|
||||
private void OnScalingChanged(object sender, EventArgs e)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Gommon;
|
||||
using Ryujinx.Common.Logging;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -14,7 +13,6 @@ namespace Ryujinx.Ava.Utilities
|
||||
public static string OverrideBackendThreading { get; private set; }
|
||||
public static string OverrideHideCursor { get; private set; }
|
||||
public static string BaseDirPathArg { get; private set; }
|
||||
public static FilePath FirmwareToInstallPathArg { get; private set; }
|
||||
public static string Profile { get; private set; }
|
||||
public static string LaunchPathArg { get; private set; }
|
||||
public static string LaunchApplicationId { get; private set; }
|
||||
@@ -43,19 +41,6 @@ namespace Ryujinx.Ava.Utilities
|
||||
|
||||
BaseDirPathArg = args[++i];
|
||||
|
||||
arguments.Add(arg);
|
||||
arguments.Add(args[i]);
|
||||
break;
|
||||
case "--install-firmware":
|
||||
if (i + 1 >= args.Length)
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Application, $"Invalid option '{arg}'");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
FirmwareToInstallPathArg = new FilePath(args[++i]);
|
||||
|
||||
arguments.Add(arg);
|
||||
arguments.Add(args[i]);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user