diff options
Diffstat (limited to 'Ryujinx.HLE/Switch.cs')
-rw-r--r-- | Ryujinx.HLE/Switch.cs | 87 |
1 files changed, 28 insertions, 59 deletions
diff --git a/Ryujinx.HLE/Switch.cs b/Ryujinx.HLE/Switch.cs index 0dcbc7ec..366a26f4 100644 --- a/Ryujinx.HLE/Switch.cs +++ b/Ryujinx.HLE/Switch.cs @@ -13,27 +13,17 @@ namespace Ryujinx.HLE { public class Switch : IDisposable { - public HLEConfiguration Configuration { get; } - + public HLEConfiguration Configuration { get; } public IHardwareDeviceDriver AudioDeviceDriver { get; } - - internal MemoryBlock Memory { get; } - - public GpuContext Gpu { get; } - - public VirtualFileSystem FileSystem => Configuration.VirtualFileSystem; - - public Horizon System { get; } - - public ApplicationLoader Application { get; } - - public PerformanceStatistics Statistics { get; } - - public Hid Hid { get; } - - public TamperMachine TamperMachine { get; } - - public IHostUiHandler UiHandler { get; } + public MemoryBlock Memory { get; } + public GpuContext Gpu { get; } + public VirtualFileSystem FileSystem { get; } + public Horizon System { get; } + public ApplicationLoader Application { get; } + public PerformanceStatistics Statistics { get; } + public Hid Hid { get; } + public TamperMachine TamperMachine { get; } + public IHostUiHandler UiHandler { get; } public bool EnableDeviceVsync { get; set; } = true; @@ -55,47 +45,27 @@ namespace Ryujinx.HLE } Configuration = configuration; + FileSystem = Configuration.VirtualFileSystem; + UiHandler = Configuration.HostUiHandler; + + AudioDeviceDriver = new CompatLayerHardwareDeviceDriver(Configuration.AudioDeviceDriver); + Memory = new MemoryBlock(Configuration.MemoryConfiguration.ToDramSize(), MemoryAllocationFlags.Reserve); + Gpu = new GpuContext(Configuration.GpuRenderer); + System = new Horizon(this); + Statistics = new PerformanceStatistics(); + Hid = new Hid(this, System.HidStorage); + Application = new ApplicationLoader(this); + TamperMachine = new TamperMachine(); - UiHandler = configuration.HostUiHandler; - - AudioDeviceDriver = new CompatLayerHardwareDeviceDriver(configuration.AudioDeviceDriver); - - Memory = new MemoryBlock(configuration.MemoryConfiguration.ToDramSize(), MemoryAllocationFlags.Reserve); - - Gpu = new GpuContext(configuration.GpuRenderer); - - System = new Horizon(this); - System.InitializeServices(); - - Statistics = new PerformanceStatistics(); - - Hid = new Hid(this, System.HidStorage); - Hid.InitDevices(); - - Application = new ApplicationLoader(this); - - TamperMachine = new TamperMachine(); - - Initialize(); - } - - private void Initialize() - { System.State.SetLanguage(Configuration.SystemLanguage); - System.State.SetRegion(Configuration.Region); - EnableDeviceVsync = Configuration.EnableVsync; - - System.State.DockedMode = Configuration.EnableDockedMode; - + EnableDeviceVsync = Configuration.EnableVsync; + System.State.DockedMode = Configuration.EnableDockedMode; System.PerformanceState.PerformanceMode = System.State.DockedMode ? PerformanceMode.Boost : PerformanceMode.Default; - - System.EnablePtc = Configuration.EnablePtc; - - System.FsIntegrityCheckLevel = Configuration.FsIntegrityCheckLevel; - - System.GlobalAccessLogMode = Configuration.FsGlobalAccessLogMode; + System.EnablePtc = Configuration.EnablePtc; + System.FsIntegrityCheckLevel = Configuration.FsIntegrityCheckLevel; + System.GlobalAccessLogMode = Configuration.FsGlobalAccessLogMode; } public void LoadCart(string exeFsDir, string romFsFile = null) @@ -132,7 +102,6 @@ namespace Ryujinx.HLE { Gpu.ProcessShaderCacheQueue(); Gpu.Renderer.PreFrame(); - Gpu.GPFifo.DispatchCalls(); } @@ -182,9 +151,9 @@ namespace Ryujinx.HLE { System.Dispose(); AudioDeviceDriver.Dispose(); - FileSystem.Unload(); + FileSystem.Dispose(); Memory.Dispose(); } } } -} +}
\ No newline at end of file |