HLE: Refactoring of ApplicationLoader (#4480)
* HLE: Refactoring of ApplicationLoader * Fix SDL2 Headless * Addresses gdkchan feedback * Fixes LoadUnpackedNca RomFS loading * remove useless casting * Cleanup and fixe empty application name * Remove ProcessInfo * Fixes typo * ActiveProcess to ActiveApplication * Update check * Clean using. * Use the correct filepath when loading Homebrew.npdm * Fix NRE in ProcessResult if MetaLoader is null * Add more checks for valid processId & return success * Add missing logging statement for npdm error * Return result for LoadKip() * Move error logging out of PFS load extension method This avoids logging "Could not find Main NCA" followed by "Loading main..." when trying to start hbl. * Fix GUIs not checking load results * Fix style and formatting issues * Fix formatting and wording * gtk: Refactor LoadApplication() --------- Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
This commit is contained in:
parent
8198b99935
commit
4c2d9ff3ff
41 changed files with 1567 additions and 1322 deletions
|
@ -6,6 +6,7 @@ using Ryujinx.HLE.FileSystem;
|
|||
using Ryujinx.HLE.HOS;
|
||||
using Ryujinx.HLE.HOS.Services.Apm;
|
||||
using Ryujinx.HLE.HOS.Services.Hid;
|
||||
using Ryujinx.HLE.Loaders.Processes;
|
||||
using Ryujinx.HLE.Ui;
|
||||
using Ryujinx.Memory;
|
||||
using System;
|
||||
|
@ -20,7 +21,7 @@ namespace Ryujinx.HLE
|
|||
public GpuContext Gpu { get; }
|
||||
public VirtualFileSystem FileSystem { get; }
|
||||
public HOS.Horizon System { get; }
|
||||
public ApplicationLoader Application { get; }
|
||||
public ProcessLoader Processes { get; }
|
||||
public PerformanceStatistics Statistics { get; }
|
||||
public Hid Hid { get; }
|
||||
public TamperMachine TamperMachine { get; }
|
||||
|
@ -50,7 +51,7 @@ namespace Ryujinx.HLE
|
|||
System = new HOS.Horizon(this);
|
||||
Statistics = new PerformanceStatistics();
|
||||
Hid = new Hid(this, System.HidStorage);
|
||||
Application = new ApplicationLoader(this);
|
||||
Processes = new ProcessLoader(this);
|
||||
TamperMachine = new TamperMachine();
|
||||
|
||||
System.State.SetLanguage(Configuration.SystemLanguage);
|
||||
|
@ -64,29 +65,29 @@ namespace Ryujinx.HLE
|
|||
System.GlobalAccessLogMode = Configuration.FsGlobalAccessLogMode;
|
||||
}
|
||||
|
||||
public void LoadCart(string exeFsDir, string romFsFile = null)
|
||||
public bool LoadCart(string exeFsDir, string romFsFile = null)
|
||||
{
|
||||
Application.LoadCart(exeFsDir, romFsFile);
|
||||
return Processes.LoadUnpackedNca(exeFsDir, romFsFile);
|
||||
}
|
||||
|
||||
public void LoadXci(string xciFile)
|
||||
public bool LoadXci(string xciFile)
|
||||
{
|
||||
Application.LoadXci(xciFile);
|
||||
return Processes.LoadXci(xciFile);
|
||||
}
|
||||
|
||||
public void LoadNca(string ncaFile)
|
||||
public bool LoadNca(string ncaFile)
|
||||
{
|
||||
Application.LoadNca(ncaFile);
|
||||
return Processes.LoadNca(ncaFile);
|
||||
}
|
||||
|
||||
public void LoadNsp(string nspFile)
|
||||
public bool LoadNsp(string nspFile)
|
||||
{
|
||||
Application.LoadNsp(nspFile);
|
||||
return Processes.LoadNsp(nspFile);
|
||||
}
|
||||
|
||||
public void LoadProgram(string fileName)
|
||||
public bool LoadProgram(string fileName)
|
||||
{
|
||||
Application.LoadProgram(fileName);
|
||||
return Processes.LoadNxo(fileName);
|
||||
}
|
||||
|
||||
public bool WaitFifo()
|
||||
|
@ -123,7 +124,7 @@ namespace Ryujinx.HLE
|
|||
|
||||
public void EnableCheats()
|
||||
{
|
||||
FileSystem.ModLoader.EnableCheats(Application.TitleId, TamperMachine);
|
||||
FileSystem.ModLoader.EnableCheats(Processes.ActiveApplication.ProgramId, TamperMachine);
|
||||
}
|
||||
|
||||
public bool IsAudioMuted()
|
||||
|
@ -152,4 +153,4 @@ namespace Ryujinx.HLE
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue