mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-09 22:52:00 +00:00
misc: improve unpacking error & add nullability to SelectedIcon
This commit is contained in:
parent
e956864697
commit
9bb50fc6dd
4 changed files with 8 additions and 12 deletions
|
@ -25,7 +25,7 @@ namespace Ryujinx.Common.Configuration
|
||||||
{
|
{
|
||||||
var unpackedFields = packedHack.UnpackBitFields(PackedFormat);
|
var unpackedFields = packedHack.UnpackBitFields(PackedFormat);
|
||||||
if (unpackedFields is not [var hack, var value])
|
if (unpackedFields is not [var hack, var value])
|
||||||
throw new ArgumentException(nameof(packedHack));
|
throw new Exception("The unpack operation on the integer resulted in an invalid unpacked result.");
|
||||||
|
|
||||||
return new EnabledDirtyHack((DirtyHack)hack, (int)value);
|
return new EnabledDirtyHack((DirtyHack)hack, (int)value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ using Avalonia.Controls;
|
||||||
using Avalonia.Controls.ApplicationLifetimes;
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
using Gommon;
|
|
||||||
using LibHac.Common;
|
using LibHac.Common;
|
||||||
using LibHac.Ns;
|
using LibHac.Ns;
|
||||||
using LibHac.Tools.FsSystem;
|
using LibHac.Tools.FsSystem;
|
||||||
|
@ -43,7 +42,6 @@ using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||||
using Ryujinx.HLE.HOS.SystemState;
|
using Ryujinx.HLE.HOS.SystemState;
|
||||||
using Ryujinx.Input;
|
using Ryujinx.Input;
|
||||||
using Ryujinx.Input.HLE;
|
using Ryujinx.Input.HLE;
|
||||||
using Silk.NET.Vulkan;
|
|
||||||
using SkiaSharp;
|
using SkiaSharp;
|
||||||
using SPB.Graphics.Vulkan;
|
using SPB.Graphics.Vulkan;
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -22598,4 +22598,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -80,7 +80,9 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
[ObservableProperty] private Brush _progressBarForegroundColor;
|
[ObservableProperty] private Brush _progressBarForegroundColor;
|
||||||
[ObservableProperty] private Brush _progressBarBackgroundColor;
|
[ObservableProperty] private Brush _progressBarBackgroundColor;
|
||||||
[ObservableProperty] private Brush _vSyncModeColor;
|
[ObservableProperty] private Brush _vSyncModeColor;
|
||||||
[ObservableProperty] private byte[] _selectedIcon;
|
#nullable enable
|
||||||
|
[ObservableProperty] private byte[]? _selectedIcon;
|
||||||
|
#nullable disable
|
||||||
[ObservableProperty] private int _statusBarProgressMaximum;
|
[ObservableProperty] private int _statusBarProgressMaximum;
|
||||||
[ObservableProperty] private int _statusBarProgressValue;
|
[ObservableProperty] private int _statusBarProgressValue;
|
||||||
[ObservableProperty] private string _statusBarProgressStatusText;
|
[ObservableProperty] private string _statusBarProgressStatusText;
|
||||||
|
@ -1754,7 +1756,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void ProcessTrimResult(String filename, Ryujinx.Common.Utilities.XCIFileTrimmer.OperationOutcome operationOutcome)
|
public async void ProcessTrimResult(String filename, XCIFileTrimmer.OperationOutcome operationOutcome)
|
||||||
{
|
{
|
||||||
string notifyUser = operationOutcome.ToLocalisedText();
|
string notifyUser = operationOutcome.ToLocalisedText();
|
||||||
|
|
||||||
|
@ -1769,12 +1771,8 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
{
|
{
|
||||||
switch (operationOutcome)
|
switch (operationOutcome)
|
||||||
{
|
{
|
||||||
case Ryujinx.Common.Utilities.XCIFileTrimmer.OperationOutcome.Successful:
|
case XCIFileTrimmer.OperationOutcome.Successful:
|
||||||
if (Avalonia.Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
RyujinxApp.MainWindow.LoadApplications();
|
||||||
{
|
|
||||||
if (desktop.MainWindow is MainWindow mainWindow)
|
|
||||||
mainWindow.LoadApplications();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue