This commit is contained in:
DismissedLight
2023-10-15 16:14:13 +08:00
parent 1bd6023e0a
commit a29b487c26

View File

@@ -26,9 +26,11 @@ internal static class ProcessInterop
/// <returns>初始化后的游戏进程</returns>
public static Process InitializeGameProcess(LaunchOptions options, string gamePath)
{
Must.Argument(options.IsBorderless ^ options.IsExclusive, "无边框与全屏选项无法同时生效");
// https://docs.unity.cn/cn/current/Manual/PlayerCommandLineArguments.html
string commandLine = new CommandLineBuilder()
.AppendIf("-popupwindow", options.IsBorderless)
.AppendIf("-window-mode", options.IsBorderless, "borderless")
.AppendIf("-window-mode", options.IsExclusive, "exclusive")
.Append("-screen-fullscreen", options.IsFullScreen ? 1 : 0)
.Append("-screen-width", options.ScreenWidth)