Options.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. using CommandLine;
  2. using Ryujinx.Common.Configuration;
  3. using Ryujinx.HLE.HOS.SystemState;
  4. namespace Ryujinx.Headless.SDL2
  5. {
  6. public class Options
  7. {
  8. // General
  9. [Option("root-data-dir", Required = false, HelpText = "Set the custom folder path for Ryujinx data.")]
  10. public string BaseDataDir { get; set; }
  11. [Option("profile", Required = false, HelpText = "Set the user profile to launch the game with.")]
  12. public string UserProfile { get; set; }
  13. // Input
  14. [Option("input-profile-1", Required = false, HelpText = "Set the input profile in use for Player 1.")]
  15. public string InputProfile1Name { get; set; }
  16. [Option("input-profile-2", Required = false, HelpText = "Set the input profile in use for Player 2.")]
  17. public string InputProfile2Name { get; set; }
  18. [Option("input-profile-3", Required = false, HelpText = "Set the input profile in use for Player 3.")]
  19. public string InputProfile3Name { get; set; }
  20. [Option("input-profile-4", Required = false, HelpText = "Set the input profile in use for Player 4.")]
  21. public string InputProfile4Name { get; set; }
  22. [Option("input-profile-5", Required = false, HelpText = "Set the input profile in use for Player 5.")]
  23. public string InputProfile5Name { get; set; }
  24. [Option("input-profile-6", Required = false, HelpText = "Set the input profile in use for Player 6.")]
  25. public string InputProfile6Name { get; set; }
  26. [Option("input-profile-7", Required = false, HelpText = "Set the input profile in use for Player 7.")]
  27. public string InputProfile7Name { get; set; }
  28. [Option("input-profile-8", Required = false, HelpText = "Set the input profile in use for Player 8.")]
  29. public string InputProfile8Name { get; set; }
  30. [Option("input-profile-handheld", Required = false, HelpText = "Set the input profile in use for the Handheld Player.")]
  31. public string InputProfileHandheldName { get; set; }
  32. [Option("input-id-1", Required = false, HelpText = "Set the input id in use for Player 1.")]
  33. public string InputId1 { get; set; }
  34. [Option("input-id-2", Required = false, HelpText = "Set the input id in use for Player 2.")]
  35. public string InputId2 { get; set; }
  36. [Option("input-id-3", Required = false, HelpText = "Set the input id in use for Player 3.")]
  37. public string InputId3 { get; set; }
  38. [Option("input-id-4", Required = false, HelpText = "Set the input id in use for Player 4.")]
  39. public string InputId4 { get; set; }
  40. [Option("input-id-5", Required = false, HelpText = "Set the input id in use for Player 5.")]
  41. public string InputId5 { get; set; }
  42. [Option("input-id-6", Required = false, HelpText = "Set the input id in use for Player 6.")]
  43. public string InputId6 { get; set; }
  44. [Option("input-id-7", Required = false, HelpText = "Set the input id in use for Player 7.")]
  45. public string InputId7 { get; set; }
  46. [Option("input-id-8", Required = false, HelpText = "Set the input id in use for Player 8.")]
  47. public string InputId8 { get; set; }
  48. [Option("input-id-handheld", Required = false, HelpText = "Set the input id in use for the Handheld Player.")]
  49. public string InputIdHandheld { get; set; }
  50. [Option("enable-keyboard", Required = false, Default = false, HelpText = "Enable or disable keyboard support (Independent from controllers binding).")]
  51. public bool EnableKeyboard { get; set; }
  52. [Option("enable-mouse", Required = false, Default = false, HelpText = "Enable or disable mouse support.")]
  53. public bool EnableMouse { get; set; }
  54. [Option("hide-cursor", Required = false, Default = HideCursor.OnIdle, HelpText = "Change when the cursor gets hidden.")]
  55. public HideCursor HideCursor { get; set; }
  56. [Option("list-input-profiles", Required = false, HelpText = "List inputs profiles.")]
  57. public bool ListInputProfiles { get; set; }
  58. [Option("list-inputs-ids", Required = false, HelpText = "List inputs ids.")]
  59. public bool ListInputIds { get; set; }
  60. // System
  61. [Option("disable-ptc", Required = false, HelpText = "Disables profiled persistent translation cache.")]
  62. public bool DisablePtc { get; set; }
  63. [Option("enable-internet-connection", Required = false, Default = false, HelpText = "Enables guest Internet connection.")]
  64. public bool EnableInternetAccess { get; set; }
  65. [Option("disable-fs-integrity-checks", Required = false, HelpText = "Disables integrity checks on Game content files.")]
  66. public bool DisableFsIntegrityChecks { get; set; }
  67. [Option("fs-global-access-log-mode", Required = false, Default = 0, HelpText = "Enables FS access log output to the console.")]
  68. public int FsGlobalAccessLogMode { get; set; }
  69. [Option("disable-vsync", Required = false, HelpText = "Disables Vertical Sync.")]
  70. public bool DisableVsync { get; set; }
  71. [Option("disable-shader-cache", Required = false, HelpText = "Disables Shader cache.")]
  72. public bool DisableShaderCache { get; set; }
  73. [Option("enable-texture-recompression", Required = false, Default = false, HelpText = "Enables Texture recompression.")]
  74. public bool EnableTextureRecompression { get; set; }
  75. [Option("disable-docked-mode", Required = false, HelpText = "Disables Docked Mode.")]
  76. public bool DisableDockedMode { get; set; }
  77. [Option("system-language", Required = false, Default = SystemLanguage.AmericanEnglish, HelpText = "Change System Language.")]
  78. public SystemLanguage SystemLanguage { get; set; }
  79. [Option("system-region", Required = false, Default = RegionCode.USA, HelpText = "Change System Region.")]
  80. public RegionCode SystemRegion { get; set; }
  81. [Option("system-timezone", Required = false, Default = "UTC", HelpText = "Change System TimeZone.")]
  82. public string SystemTimeZone { get; set; }
  83. [Option("system-time-offset", Required = false, Default = 0, HelpText = "Change System Time Offset in seconds.")]
  84. public long SystemTimeOffset { get; set; }
  85. [Option("memory-manager-mode", Required = false, Default = MemoryManagerMode.HostMappedUnsafe, HelpText = "The selected memory manager mode.")]
  86. public MemoryManagerMode MemoryManagerMode { get; set; }
  87. [Option("audio-volume", Required = false, Default = 1.0f, HelpText ="The audio level (0 to 1).")]
  88. public float AudioVolume { get; set; }
  89. // Logging
  90. [Option("disable-file-logging", Required = false, Default = false, HelpText = "Disables logging to a file on disk.")]
  91. public bool DisableFileLog { get; set; }
  92. [Option("enable-debug-logs", Required = false, Default = false, HelpText = "Enables printing debug log messages.")]
  93. public bool LoggingEnableDebug { get; set; }
  94. [Option("disable-stub-logs", Required = false, HelpText = "Disables printing stub log messages.")]
  95. public bool LoggingDisableStub { get; set; }
  96. [Option("disable-info-logs", Required = false, HelpText = "Disables printing info log messages.")]
  97. public bool LoggingDisableInfo { get; set; }
  98. [Option("disable-warning-logs", Required = false, HelpText = "Disables printing warning log messages.")]
  99. public bool LoggingDisableWarning { get; set; }
  100. [Option("disable-error-logs", Required = false, HelpText = "Disables printing error log messages.")]
  101. public bool LoggingEnableError { get; set; }
  102. [Option("enable-trace-logs", Required = false, Default = false, HelpText = "Enables printing trace log messages.")]
  103. public bool LoggingEnableTrace { get; set; }
  104. [Option("disable-guest-logs", Required = false, HelpText = "Disables printing guest log messages.")]
  105. public bool LoggingDisableGuest { get; set; }
  106. [Option("enable-fs-access-logs", Required = false, Default = false, HelpText = "Enables printing FS access log messages.")]
  107. public bool LoggingEnableFsAccessLog { get; set; }
  108. [Option("graphics-debug-level", Required = false, Default = GraphicsDebugLevel.None, HelpText = "Change Graphics API debug log level.")]
  109. public GraphicsDebugLevel LoggingGraphicsDebugLevel { get; set; }
  110. // Graphics
  111. [Option("resolution-scale", Required = false, Default = 1, HelpText = "Resolution Scale. A floating point scale applied to applicable render targets.")]
  112. public float ResScale { get; set; }
  113. [Option("max-anisotropy", Required = false, Default = -1, HelpText = "Max Anisotropy. Values range from 0 - 16. Set to -1 to let the game decide.")]
  114. public float MaxAnisotropy { get; set; }
  115. [Option("aspect-ratio", Required = false, Default = AspectRatio.Fixed16x9, HelpText = "Aspect Ratio applied to the renderer window.")]
  116. public AspectRatio AspectRatio { get; set; }
  117. [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.")]
  118. public BackendThreading BackendThreading { get; set; }
  119. [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.")]
  120. public bool DisableMacroHLE { get; set; }
  121. [Option("graphics-shaders-dump-path", Required = false, HelpText = "Dumps shaders in this local directory. (Developer only)")]
  122. public string GraphicsShadersDumpPath { get; set; }
  123. [Option("graphics-backend", Required = false, Default = GraphicsBackend.OpenGl, HelpText = "Change Graphics Backend to use.")]
  124. public GraphicsBackend GraphicsBackend { get; set; }
  125. [Option("preferred-gpu-vendor", Required = false, Default = "", HelpText = "When using the Vulkan backend, prefer using the GPU from the specified vendor.")]
  126. public string PreferredGpuVendor { get; set; }
  127. // Hacks
  128. [Option("expand-ram", Required = false, Default = false, HelpText = "Expands the RAM amount on the emulated system from 4GiB to 6GiB.")]
  129. public bool ExpandRam { get; set; }
  130. [Option("ignore-missing-services", Required = false, Default = false, HelpText = "Enable ignoring missing services.")]
  131. public bool IgnoreMissingServices { get; set; }
  132. // Values
  133. [Value(0, MetaName = "input", HelpText = "Input to load.", Required = true)]
  134. public string InputPath { get; set; }
  135. }
  136. }