hle/ui: Basic multi programs support (#1560)

* hos/gui: Add a check of NCA program index in titleid

This add a check to `ApplicationLoader` for the last 2 digits of the game TitleId who seems to be the NCA program index.
We currently return the last index, instead of the lower one.
Same check is added to ApplicationLibrary in the UI.

I've cleaned up both file too.

* hle: implement partial relaunch logic

TODO: make the emulator auto relauch.

* Handle auto relaunch

* hle: Unify update usage system

* hle: Implement support of multi programs in update system

* Add some documentation

* Address rip's comment

Co-authored-by: Ac_K <Acoustik666@gmail.com>
This commit is contained in:
Mary 2020-09-21 05:45:30 +02:00 committed by GitHub
parent 90ab28d1c6
commit 33f8284bc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 435 additions and 270 deletions

View file

@ -35,13 +35,15 @@ namespace Ryujinx.HLE
public PerformanceStatistics Statistics { get; private set; }
public UserChannelPersistence UserChannelPersistence { get; }
public Hid Hid { get; private set; }
public IHostUiHandler UiHandler { get; set; }
public bool EnableDeviceVsync { get; set; } = true;
public Switch(VirtualFileSystem fileSystem, ContentManager contentManager, IRenderer renderer, IAalOutput audioOut)
public Switch(VirtualFileSystem fileSystem, ContentManager contentManager, UserChannelPersistence userChannelPersistence, IRenderer renderer, IAalOutput audioOut)
{
if (renderer == null)
{
@ -53,6 +55,13 @@ namespace Ryujinx.HLE
throw new ArgumentNullException(nameof(audioOut));
}
if (userChannelPersistence == null)
{
throw new ArgumentNullException(nameof(userChannelPersistence));
}
UserChannelPersistence = userChannelPersistence;
AudioOut = audioOut;
Memory = new MemoryBlock(1UL << 32);