using LibHac.FsSystem;
using Ryujinx.Audio.Integration;
using Ryujinx.Common;
using Ryujinx.Common.Configuration;
using Ryujinx.Common.Configuration.Hid;
using Ryujinx.Graphics.GAL;
using Ryujinx.HLE.FileSystem;
using Ryujinx.HLE.FileSystem.Content;
using Ryujinx.HLE.HOS;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using Ryujinx.HLE.HOS.SystemState;
using System;
using System.Collections.Generic;
namespace Ryujinx.HLE
{
///
/// HLE configuration.
///
public class HLEConfiguration
{
///
/// The virtual file system used by the FS service.
///
/// This cannot be changed after instantiation.
internal readonly VirtualFileSystem VirtualFileSystem;
///
/// The account manager used by the account service.
///
/// This cannot be changed after instantiation.
internal readonly AccountManager AccountManager;
///
/// The content manager used by the NCM service.
///
/// This cannot be changed after instantiation.
internal readonly ContentManager ContentManager;
///
/// The persistant information between run for multi-application capabilities.
///
/// This cannot be changed after instantiation.
public readonly UserChannelPersistence UserChannelPersistence;
///
/// The GPU renderer to use for all GPU operations.
///
/// This cannot be changed after instantiation.
internal readonly IRenderer GpuRenderer;
///
/// The audio device driver to use for all audio operations.
///
/// This cannot be changed after instantiation.
internal readonly IHardwareDeviceDriver AudioDeviceDriver;
///
/// The handler for various UI related operations needed outside of HLE.
///
/// This cannot be changed after instantiation.
internal readonly IHostUiHandler HostUiHandler;
///
/// Control the memory configuration used by the emulation context.
///
/// This cannot be changed after instantiation.
internal readonly MemoryConfiguration MemoryConfiguration;
///
/// The system language to use in the settings service.
///
/// This cannot be changed after instantiation.
internal readonly SystemLanguage SystemLanguage;
///
/// The system region to use in the settings service.
///
/// This cannot be changed after instantiation.
internal readonly RegionCode Region;
///
/// Control the initial state of the vertical sync in the SurfaceFlinger service.
///
internal readonly bool EnableVsync;
///
/// Control the initial state of the docked mode.
///
internal readonly bool EnableDockedMode;
///
/// Control if the Profiled Translation Cache (PTC) should be used.
///
internal readonly bool EnablePtc;
///
/// Control LibHac's integrity check level.
///
/// This cannot be changed after instantiation.
internal readonly IntegrityCheckLevel FsIntegrityCheckLevel;
///
/// Control LibHac's global access logging level. Value must be between 0 and 3.
///
/// This cannot be changed after instantiation.
internal readonly int FsGlobalAccessLogMode;
///
/// The system time offset to apply to the time service steady and local clocks.
///
/// This cannot be changed after instantiation.
internal readonly long SystemTimeOffset;
///
/// The system timezone used by the time service.
///
/// This cannot be changed after instantiation.
internal readonly string TimeZone;
///
///
public MemoryManagerMode MemoryManagerMode { internal get; set; }
///
/// Control the inital state of the ignore missing services setting.
/// If this is set to true, when a missing service is encountered, it will try to automatically handle it instead of throwing an exception.
///
/// TODO: Update this again.
public bool IgnoreMissingServices { internal get; set; }
///
/// Aspect Ratio applied to the renderer window by the SurfaceFlinger service.
///
public AspectRatio AspectRatio { get; set; }
///
/// An action called when HLE force a refresh of output after docked mode changed.
///
public Action RefreshInputConfig { internal get; set; }
public HLEConfiguration(VirtualFileSystem virtualFileSystem,
ContentManager contentManager,
AccountManager accountManager,
UserChannelPersistence userChannelPersistence,
IRenderer gpuRenderer,
IHardwareDeviceDriver audioDeviceDriver,
MemoryConfiguration memoryConfiguration,
IHostUiHandler hostUiHandler,
SystemLanguage systemLanguage,
RegionCode region,
bool enableVsync,
bool enableDockedMode,
bool enablePtc,
IntegrityCheckLevel fsIntegrityCheckLevel,
int fsGlobalAccessLogMode,
long systemTimeOffset,
string timeZone,
MemoryManagerMode memoryManagerMode,
bool ignoreMissingServices,
AspectRatio aspectRatio)
{
VirtualFileSystem = virtualFileSystem;
AccountManager = accountManager;
ContentManager = contentManager;
UserChannelPersistence = userChannelPersistence;
GpuRenderer = gpuRenderer;
AudioDeviceDriver = audioDeviceDriver;
MemoryConfiguration = memoryConfiguration;
HostUiHandler = hostUiHandler;
SystemLanguage = systemLanguage;
Region = region;
EnableVsync = enableVsync;
EnableDockedMode = enableDockedMode;
EnablePtc = enablePtc;
FsIntegrityCheckLevel = fsIntegrityCheckLevel;
FsGlobalAccessLogMode = fsGlobalAccessLogMode;
SystemTimeOffset = systemTimeOffset;
TimeZone = timeZone;
MemoryManagerMode = memoryManagerMode;
IgnoreMissingServices = ignoreMissingServices;
AspectRatio = aspectRatio;
}
}
}