aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core/Switch.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Core/Switch.cs')
-rw-r--r--Ryujinx.Core/Switch.cs41
1 files changed, 30 insertions, 11 deletions
diff --git a/Ryujinx.Core/Switch.cs b/Ryujinx.Core/Switch.cs
index 487f3bdb..92d78f45 100644
--- a/Ryujinx.Core/Switch.cs
+++ b/Ryujinx.Core/Switch.cs
@@ -1,3 +1,4 @@
+using Ryujinx.Audio;
using Ryujinx.Core.Input;
using Ryujinx.Core.OsHle;
using Ryujinx.Core.Settings;
@@ -9,32 +10,50 @@ namespace Ryujinx.Core
{
public class Switch : IDisposable
{
- internal NsGpu Gpu { get; private set; }
- internal Horizon Os { get; private set; }
- internal VirtualFs VFs { get; private set; }
+ internal IAalOutput AudioOut { get; private set; }
+
+ internal NsGpu Gpu { get; private set; }
+
+ internal Horizon Os { get; private set; }
+
+ internal VirtualFileSystem VFs { get; private set; }
+
+ public SystemSettings Settings { get; private set; }
- public Hid Hid { get; private set; }
- public SetSys Settings { get; private set; }
public PerformanceStatistics Statistics { get; private set; }
+ public Hid Hid { get; private set; }
+
public event EventHandler Finish;
- public Switch(IGalRenderer Renderer)
+ public Switch(IGalRenderer Renderer, IAalOutput AudioOut)
{
+ if (Renderer == null)
+ {
+ throw new ArgumentNullException(nameof(Renderer));
+ }
+
+ if (AudioOut == null)
+ {
+ throw new ArgumentNullException(nameof(AudioOut));
+ }
+
+ this.AudioOut = AudioOut;
+
Gpu = new NsGpu(Renderer);
- VFs = new VirtualFs();
+ Os = new Horizon(this);
- Hid = new Hid();
+ VFs = new VirtualFileSystem();
+
+ Settings = new SystemSettings();
Statistics = new PerformanceStatistics();
- Os = new Horizon(this);
+ Hid = new Hid();
Os.HidSharedMem.MemoryMapped += Hid.ShMemMap;
Os.HidSharedMem.MemoryUnmapped += Hid.ShMemUnmap;
-
- Settings = new SetSys();
}
public void LoadCart(string ExeFsDir, string RomFsFile = null)