Options.cs
1 using CommandLine; 2 using Ryujinx.Common.Configuration; 3 using Ryujinx.HLE.HOS.SystemState; 4 5 namespace Ryujinx.Headless.SDL2 6 { 7 public class Options 8 { 9 // General 10 11 [Option("root-data-dir", Required = false, HelpText = "Set the custom folder path for Ryujinx data.")] 12 public string BaseDataDir { get; set; } 13 14 [Option("profile", Required = false, HelpText = "Set the user profile to launch the game with.")] 15 public string UserProfile { get; set; } 16 17 [Option("display-id", Required = false, Default = 0, HelpText = "Set the display to use - especially helpful for fullscreen mode. [0-n]")] 18 public int DisplayId { get; set; } 19 20 [Option("fullscreen", Required = false, Default = false, HelpText = "Launch the game in fullscreen mode.")] 21 public bool IsFullscreen { get; set; } 22 23 [Option("exclusive-fullscreen", Required = false, Default = false, HelpText = "Launch the game in exclusive fullscreen mode.")] 24 public bool IsExclusiveFullscreen { get; set; } 25 26 [Option("exclusive-fullscreen-width", Required = false, Default = 1920, HelpText = "Set horizontal resolution for exclusive fullscreen mode.")] 27 public int ExclusiveFullscreenWidth { get; set; } 28 29 [Option("exclusive-fullscreen-height", Required = false, Default = 1080, HelpText = "Set vertical resolution for exclusive fullscreen mode.")] 30 public int ExclusiveFullscreenHeight { get; set; } 31 32 // Input 33 34 [Option("input-profile-1", Required = false, HelpText = "Set the input profile in use for Player 1.")] 35 public string InputProfile1Name { get; set; } 36 37 [Option("input-profile-2", Required = false, HelpText = "Set the input profile in use for Player 2.")] 38 public string InputProfile2Name { get; set; } 39 40 [Option("input-profile-3", Required = false, HelpText = "Set the input profile in use for Player 3.")] 41 public string InputProfile3Name { get; set; } 42 43 [Option("input-profile-4", Required = false, HelpText = "Set the input profile in use for Player 4.")] 44 public string InputProfile4Name { get; set; } 45 46 [Option("input-profile-5", Required = false, HelpText = "Set the input profile in use for Player 5.")] 47 public string InputProfile5Name { get; set; } 48 49 [Option("input-profile-6", Required = false, HelpText = "Set the input profile in use for Player 6.")] 50 public string InputProfile6Name { get; set; } 51 52 [Option("input-profile-7", Required = false, HelpText = "Set the input profile in use for Player 7.")] 53 public string InputProfile7Name { get; set; } 54 55 [Option("input-profile-8", Required = false, HelpText = "Set the input profile in use for Player 8.")] 56 public string InputProfile8Name { get; set; } 57 58 [Option("input-profile-handheld", Required = false, HelpText = "Set the input profile in use for the Handheld Player.")] 59 public string InputProfileHandheldName { get; set; } 60 61 [Option("input-id-1", Required = false, HelpText = "Set the input id in use for Player 1.")] 62 public string InputId1 { get; set; } 63 64 [Option("input-id-2", Required = false, HelpText = "Set the input id in use for Player 2.")] 65 public string InputId2 { get; set; } 66 67 [Option("input-id-3", Required = false, HelpText = "Set the input id in use for Player 3.")] 68 public string InputId3 { get; set; } 69 70 [Option("input-id-4", Required = false, HelpText = "Set the input id in use for Player 4.")] 71 public string InputId4 { get; set; } 72 73 [Option("input-id-5", Required = false, HelpText = "Set the input id in use for Player 5.")] 74 public string InputId5 { get; set; } 75 76 [Option("input-id-6", Required = false, HelpText = "Set the input id in use for Player 6.")] 77 public string InputId6 { get; set; } 78 79 [Option("input-id-7", Required = false, HelpText = "Set the input id in use for Player 7.")] 80 public string InputId7 { get; set; } 81 82 [Option("input-id-8", Required = false, HelpText = "Set the input id in use for Player 8.")] 83 public string InputId8 { get; set; } 84 85 [Option("input-id-handheld", Required = false, HelpText = "Set the input id in use for the Handheld Player.")] 86 public string InputIdHandheld { get; set; } 87 88 [Option("enable-keyboard", Required = false, Default = false, HelpText = "Enable or disable keyboard support (Independent from controllers binding).")] 89 public bool EnableKeyboard { get; set; } 90 91 [Option("enable-mouse", Required = false, Default = false, HelpText = "Enable or disable mouse support.")] 92 public bool EnableMouse { get; set; } 93 94 [Option("hide-cursor", Required = false, Default = HideCursorMode.OnIdle, HelpText = "Change when the cursor gets hidden.")] 95 public HideCursorMode HideCursorMode { get; set; } 96 97 [Option("list-input-profiles", Required = false, HelpText = "List inputs profiles.")] 98 public bool ListInputProfiles { get; set; } 99 100 [Option("list-inputs-ids", Required = false, HelpText = "List inputs ids.")] 101 public bool ListInputIds { get; set; } 102 103 // System 104 105 [Option("disable-ptc", Required = false, HelpText = "Disables profiled persistent translation cache.")] 106 public bool DisablePTC { get; set; } 107 108 [Option("enable-internet-connection", Required = false, Default = false, HelpText = "Enables guest Internet connection.")] 109 public bool EnableInternetAccess { get; set; } 110 111 [Option("disable-fs-integrity-checks", Required = false, HelpText = "Disables integrity checks on Game content files.")] 112 public bool DisableFsIntegrityChecks { get; set; } 113 114 [Option("fs-global-access-log-mode", Required = false, Default = 0, HelpText = "Enables FS access log output to the console.")] 115 public int FsGlobalAccessLogMode { get; set; } 116 117 [Option("disable-vsync", Required = false, HelpText = "Disables Vertical Sync.")] 118 public bool DisableVSync { get; set; } 119 120 [Option("disable-shader-cache", Required = false, HelpText = "Disables Shader cache.")] 121 public bool DisableShaderCache { get; set; } 122 123 [Option("enable-texture-recompression", Required = false, Default = false, HelpText = "Enables Texture recompression.")] 124 public bool EnableTextureRecompression { get; set; } 125 126 [Option("disable-docked-mode", Required = false, HelpText = "Disables Docked Mode.")] 127 public bool DisableDockedMode { get; set; } 128 129 [Option("system-language", Required = false, Default = SystemLanguage.AmericanEnglish, HelpText = "Change System Language.")] 130 public SystemLanguage SystemLanguage { get; set; } 131 132 [Option("system-region", Required = false, Default = RegionCode.USA, HelpText = "Change System Region.")] 133 public RegionCode SystemRegion { get; set; } 134 135 [Option("system-timezone", Required = false, Default = "UTC", HelpText = "Change System TimeZone.")] 136 public string SystemTimeZone { get; set; } 137 138 [Option("system-time-offset", Required = false, Default = 0, HelpText = "Change System Time Offset in seconds.")] 139 public long SystemTimeOffset { get; set; } 140 141 [Option("memory-manager-mode", Required = false, Default = MemoryManagerMode.HostMappedUnsafe, HelpText = "The selected memory manager mode.")] 142 public MemoryManagerMode MemoryManagerMode { get; set; } 143 144 [Option("audio-volume", Required = false, Default = 1.0f, HelpText = "The audio level (0 to 1).")] 145 public float AudioVolume { get; set; } 146 147 [Option("use-hypervisor", Required = false, Default = true, HelpText = "Uses Hypervisor over JIT if available.")] 148 public bool? UseHypervisor { get; set; } 149 150 [Option("lan-interface-id", Required = false, Default = "0", HelpText = "GUID for the network interface used by LAN.")] 151 public string MultiplayerLanInterfaceId { get; set; } 152 153 // Logging 154 155 [Option("disable-file-logging", Required = false, Default = false, HelpText = "Disables logging to a file on disk.")] 156 public bool DisableFileLog { get; set; } 157 158 [Option("enable-debug-logs", Required = false, Default = false, HelpText = "Enables printing debug log messages.")] 159 public bool LoggingEnableDebug { get; set; } 160 161 [Option("disable-stub-logs", Required = false, HelpText = "Disables printing stub log messages.")] 162 public bool LoggingDisableStub { get; set; } 163 164 [Option("disable-info-logs", Required = false, HelpText = "Disables printing info log messages.")] 165 public bool LoggingDisableInfo { get; set; } 166 167 [Option("disable-warning-logs", Required = false, HelpText = "Disables printing warning log messages.")] 168 public bool LoggingDisableWarning { get; set; } 169 170 [Option("disable-error-logs", Required = false, HelpText = "Disables printing error log messages.")] 171 public bool LoggingEnableError { get; set; } 172 173 [Option("enable-trace-logs", Required = false, Default = false, HelpText = "Enables printing trace log messages.")] 174 public bool LoggingEnableTrace { get; set; } 175 176 [Option("disable-guest-logs", Required = false, HelpText = "Disables printing guest log messages.")] 177 public bool LoggingDisableGuest { get; set; } 178 179 [Option("enable-fs-access-logs", Required = false, Default = false, HelpText = "Enables printing FS access log messages.")] 180 public bool LoggingEnableFsAccessLog { get; set; } 181 182 [Option("graphics-debug-level", Required = false, Default = GraphicsDebugLevel.None, HelpText = "Change Graphics API debug log level.")] 183 public GraphicsDebugLevel LoggingGraphicsDebugLevel { get; set; } 184 185 // Graphics 186 187 [Option("resolution-scale", Required = false, Default = 1, HelpText = "Resolution Scale. A floating point scale applied to applicable render targets.")] 188 public float ResScale { get; set; } 189 190 [Option("max-anisotropy", Required = false, Default = -1, HelpText = "Max Anisotropy. Values range from 0 - 16. Set to -1 to let the game decide.")] 191 public float MaxAnisotropy { get; set; } 192 193 [Option("aspect-ratio", Required = false, Default = AspectRatio.Fixed16x9, HelpText = "Aspect Ratio applied to the renderer window.")] 194 public AspectRatio AspectRatio { get; set; } 195 196 [Option("backend-threading", Required = false, Default = BackendThreading.Auto, HelpText = "Whether or not backend threading is enabled. The \"Auto\" setting will determine whether threading should be enabled at runtime.")] 197 public BackendThreading BackendThreading { get; set; } 198 199 [Option("disable-macro-hle", Required = false, HelpText = "Disables high-level emulation of Macro code. Leaving this enabled improves performance but may cause graphical glitches in some games.")] 200 public bool DisableMacroHLE { get; set; } 201 202 [Option("graphics-shaders-dump-path", Required = false, HelpText = "Dumps shaders in this local directory. (Developer only)")] 203 public string GraphicsShadersDumpPath { get; set; } 204 205 [Option("graphics-backend", Required = false, Default = GraphicsBackend.OpenGl, HelpText = "Change Graphics Backend to use.")] 206 public GraphicsBackend GraphicsBackend { get; set; } 207 208 [Option("preferred-gpu-vendor", Required = false, Default = "", HelpText = "When using the Vulkan backend, prefer using the GPU from the specified vendor.")] 209 public string PreferredGPUVendor { get; set; } 210 211 [Option("anti-aliasing", Required = false, Default = AntiAliasing.None, HelpText = "Set the type of anti aliasing being used. [None|Fxaa|SmaaLow|SmaaMedium|SmaaHigh|SmaaUltra]")] 212 public AntiAliasing AntiAliasing { get; set; } 213 214 [Option("scaling-filter", Required = false, Default = ScalingFilter.Bilinear, HelpText = "Set the scaling filter. [Bilinear|Nearest|Fsr]")] 215 public ScalingFilter ScalingFilter { get; set; } 216 217 [Option("scaling-filter-level", Required = false, Default = 0, HelpText = "Set the scaling filter intensity (currently only applies to FSR). [0-100]")] 218 public int ScalingFilterLevel { get; set; } 219 220 // Hacks 221 222 [Option("expand-ram", Required = false, Default = false, HelpText = "Expands the RAM amount on the emulated system from 4GiB to 8GiB.")] 223 public bool ExpandRAM { get; set; } 224 225 [Option("ignore-missing-services", Required = false, Default = false, HelpText = "Enable ignoring missing services.")] 226 public bool IgnoreMissingServices { get; set; } 227 228 // Values 229 230 [Value(0, MetaName = "input", HelpText = "Input to load.", Required = true)] 231 public string InputPath { get; set; } 232 } 233 }