Compare commits

...

4 Commits

Author SHA1 Message Date
Evan Husted
3e5b2bda38 UI: RPC: Goat Simulator 3 asset image 2025-01-03 22:25:32 -06:00
Evan Husted
9bb50fc6dd misc: improve unpacking error & add nullability to SelectedIcon 2025-01-03 22:25:32 -06:00
Evan Husted
e956864697 misc: Remove needless AsObservableList 2025-01-03 22:25:32 -06:00
WilliamWsyHK
f43442f774 Include Hack for XC2 JP Edition (#481)
XC2 has 2 editions, one JP and one global. I own the JP version and
suffered from the soft-lock, meanwhile the current hack only works for
global edition, so PR is simply include JP edition from the hack.
2025-01-01 02:15:14 -06:00
6 changed files with 52 additions and 54 deletions

View File

@@ -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);
} }

View File

@@ -171,6 +171,7 @@ namespace Ryujinx.Common
"0100b41013c82000", // Cruis'n Blast "0100b41013c82000", // Cruis'n Blast
"01001b300b9be000", // Diablo III: Eternal Collection "01001b300b9be000", // Diablo III: Eternal Collection
"01008c8012920000", // Dying Light Platinum Edition "01008c8012920000", // Dying Light Platinum Edition
"01001cc01b2d4000", // Goat Simulator 3
"010073c01af34000", // LEGO Horizon Adventures "010073c01af34000", // LEGO Horizon Adventures
"0100770008dd8000", // Monster Hunter Generations Ultimate "0100770008dd8000", // Monster Hunter Generations Ultimate
"0100b04011742000", // Monster Hunter Rise "0100b04011742000", // Monster Hunter Rise

View File

@@ -16,7 +16,9 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
_baseStorage = SharedRef<LibHac.FsSrv.Sf.IStorage>.CreateMove(ref baseStorage); _baseStorage = SharedRef<LibHac.FsSrv.Sf.IStorage>.CreateMove(ref baseStorage);
} }
private const string Xc2TitleId = "0100e95004038000"; private const string Xc2JpTitleId = "0100f3400332c000";
private const string Xc2GlobalTitleId = "0100e95004038000";
private static bool IsXc2 => TitleIDs.CurrentApplication.Value.OrDefault() is Xc2GlobalTitleId or Xc2JpTitleId;
[CommandCmif(0)] [CommandCmif(0)]
// Read(u64 offset, u64 length) -> buffer<u8, 0x46, 0> buffer // Read(u64 offset, u64 length) -> buffer<u8, 0x46, 0> buffer
@@ -39,7 +41,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
using var region = context.Memory.GetWritableRegion(bufferAddress, (int)bufferLen, true); using var region = context.Memory.GetWritableRegion(bufferAddress, (int)bufferLen, true);
Result result = _baseStorage.Get.Read((long)offset, new OutBuffer(region.Memory.Span), (long)size); Result result = _baseStorage.Get.Read((long)offset, new OutBuffer(region.Memory.Span), (long)size);
if (context.Device.DirtyHacks.IsEnabled(DirtyHack.Xc2MenuSoftlockFix) && TitleIDs.CurrentApplication.Value == Xc2TitleId) if (context.Device.DirtyHacks.IsEnabled(DirtyHack.Xc2MenuSoftlockFix) && IsXc2)
{ {
// Add a load-bearing sleep to avoid XC2 softlock // Add a load-bearing sleep to avoid XC2 softlock
// https://web.archive.org/web/20240728045136/https://github.com/Ryujinx/Ryujinx/issues/2357 // https://web.archive.org/web/20240728045136/https://github.com/Ryujinx/Ryujinx/issues/2357

View File

@@ -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;

View File

@@ -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;
@@ -125,43 +127,6 @@ namespace Ryujinx.Ava.UI.ViewModels
private ApplicationData _listSelectedApplication; private ApplicationData _listSelectedApplication;
private ApplicationData _gridSelectedApplication; private ApplicationData _gridSelectedApplication;
public ApplicationData ListSelectedApplication
{
get => _listSelectedApplication;
set
{
_listSelectedApplication = value;
#pragma warning disable MVVMTK0034
if (_listSelectedApplication != null && _listAppContextMenu == null)
ListAppContextMenu = new ApplicationContextMenu();
else if (_listSelectedApplication == null && _listAppContextMenu != null)
ListAppContextMenu = null!;
#pragma warning restore MVVMTK0034
OnPropertyChanged();
}
}
public ApplicationData GridSelectedApplication
{
get => _gridSelectedApplication;
set
{
_gridSelectedApplication = value;
#pragma warning disable MVVMTK0034
if (_gridSelectedApplication != null && _gridAppContextMenu == null)
GridAppContextMenu = new ApplicationContextMenu();
else if (_gridSelectedApplication == null && _gridAppContextMenu != null)
GridAppContextMenu = null!;
#pragma warning restore MVVMTK0034
OnPropertyChanged();
}
}
// Key is Title ID // Key is Title ID
public SafeDictionary<string, LdnGameData.Array> LdnData = []; public SafeDictionary<string, LdnGameData.Array> LdnData = [];
@@ -185,9 +150,8 @@ namespace Ryujinx.Ava.UI.ViewModels
.OnItemAdded(_ => OnPropertyChanged(nameof(AppsObservableList))) .OnItemAdded(_ => OnPropertyChanged(nameof(AppsObservableList)))
.OnItemRemoved(_ => OnPropertyChanged(nameof(AppsObservableList))) .OnItemRemoved(_ => OnPropertyChanged(nameof(AppsObservableList)))
#pragma warning disable MVVMTK0034 // Event to update is fired below #pragma warning disable MVVMTK0034 // Event to update is fired below
.Bind(out _appsObservableList) .Bind(out _appsObservableList);
#pragma warning restore MVVMTK0034 #pragma warning restore MVVMTK0034
.AsObservableList();
_rendererWaitEvent = new AutoResetEvent(false); _rendererWaitEvent = new AutoResetEvent(false);
@@ -336,6 +300,43 @@ namespace Ryujinx.Ava.UI.ViewModels
} }
} }
public ApplicationData ListSelectedApplication
{
get => _listSelectedApplication;
set
{
_listSelectedApplication = value;
#pragma warning disable MVVMTK0034
if (_listSelectedApplication != null && _listAppContextMenu == null)
ListAppContextMenu = new ApplicationContextMenu();
else if (_listSelectedApplication == null && _listAppContextMenu != null)
ListAppContextMenu = null!;
#pragma warning restore MVVMTK0034
OnPropertyChanged();
}
}
public ApplicationData GridSelectedApplication
{
get => _gridSelectedApplication;
set
{
_gridSelectedApplication = value;
#pragma warning disable MVVMTK0034
if (_gridSelectedApplication != null && _gridAppContextMenu == null)
GridAppContextMenu = new ApplicationContextMenu();
else if (_gridSelectedApplication == null && _gridAppContextMenu != null)
GridAppContextMenu = null!;
#pragma warning restore MVVMTK0034
OnPropertyChanged();
}
}
public ApplicationData SelectedApplication public ApplicationData SelectedApplication
{ {
get get
@@ -1755,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();
@@ -1770,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;
} }
} }