mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-05 10:28:56 +02:00
HLE: Update ProcessResult in ProcessLoader.cs
Some games/applications may crash with a specific error: 00:00:00.690 |E| Application : Unhandled exception caught: System.Collections.Generic.KeyNotFoundException: The given key '0' was not present in the dictionary. (or a different key) However, this message is misleading and not indicative of the actual error (it masks it). As an example, the error above was seen when attempting to load a mod onto Yo-kai Watch 1 (base game + update worked). However, after patching the ProcessResult, the resulting error was more revealing: 00:00:00.716 |E| Application : Unhandled exception caught: LibHac.Common.HorizonResultException: ResultFsInvalidCharacter (2002-6004): Error creating LocalFileSystem. at LibHac.FsSystem.LocalFileSystem..ctor(String rootPath) (and so forth) The actual error was due to an incorrect folder name in the Mods folder.
This commit is contained in:
@@ -24,7 +24,16 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||||||
|
|
||||||
private ulong _latestPid;
|
private ulong _latestPid;
|
||||||
|
|
||||||
public ProcessResult ActiveApplication => _processesByPid[_latestPid];
|
public ProcessResult ActiveApplication
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_latestPid != 0 && _processesByPid.TryGetValue(_latestPid, out ProcessResult process))
|
||||||
|
return process;
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ProcessLoader(Switch device)
|
public ProcessLoader(Switch device)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user