From da4dc73a44d18b15c617ed22c05ef0fed0a1df80 Mon Sep 17 00:00:00 2001 From: GameParrot <85067619+GameParrot@users.noreply.github.com> Date: Sat, 25 Mar 2023 20:02:30 -0400 Subject: [PATCH] Fix window width and height --- Sources/lunarcmd/main.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Sources/lunarcmd/main.swift b/Sources/lunarcmd/main.swift index e886510..e187640 100644 --- a/Sources/lunarcmd/main.swift +++ b/Sources/lunarcmd/main.swift @@ -65,7 +65,7 @@ if argv.contains("-version") { exit(0) } if argv.contains("-h") || argv.contains("--help") { - print("Overview: LunarCmd launches Lunar Client from the command line.\nusage: lunarcmd [-version] --version [--gameDir ] [--server ] [--mem ] [--width ] [--height ] [--branch ] [--jvm ] [--javaExec ] [--storageDir ] [--logAddons] [--downloadOnly] [--disablePythonSignIn] [--quitOnLeave] [--no-optifine] [--max-threads] [--sodium] [--launch-override ] [--no-fps-booster] [--neu]\nArgument description\n-version - Print LunarCmd version and exit\n--version - (Required) The Lunar Client version to launch\n--gameDir - The directory to use for game settings and worlds\n--server - A server to connect to automatically when the game launches\n--mem - How much RAM to allocate to the game\n--width - The default width of the window\n--height - The default height of the window\n--branch - The branch to use for the game\n--jvm - Argument to pass to the JVM\n--javaExec - The path to the Java executable\n--storageDir - Directory to use for Lunar Client and mod settings\n--logAddons - Enables coloring certain log messages and prints chat messages directly\n--downloadOnly - Downloads the game and assets without starting it\n--disablePythonSignIn - Disables the use of the Python sign in script\n--quitOnLeave - Quits the game when you leave a server. --server must also be passed. `production.spectrum.moonsworth.cloud.:222` must also be in your server list for this to work.\n--no-optifine - Sets the module in the launch request to lunar-noOF\n--max-threads - Sets the max number of threads for downloading (Default: \(ProcessInfo.processInfo.processorCount))\n--sodium - Uses Sodium instead of OptiFine; compatible with 1.16 and newer\n--launch-override - Overrides an option in the launch request, override formatted as =\n--no-fps-booster - Stops the game from using an FPS Booster (OptiFine or Sodium)\n--neu - Sets NEU (Not Enough Updates) as the module") + print("Overview: LunarCmd launches Lunar Client from the command line.\nusage: lunarcmd [-version] --version [--gameDir ] [--server ] [--mem ] [--width ] [--height ] [--branch ] [--jvm ] [--javaExec ] [--storageDir ] [--logAddons] [--downloadOnly] [--disablePythonSignIn] [--quitOnLeave] [--no-optifine] [--max-threads] [--sodium] [--launch-override ] [--no-fps-booster] [--neu]\nArgument description\n-version - Print LunarCmd version and exit\n--version - (Required) The Lunar Client version to launch\n--gameDir - The directory to use for game settings and worlds\n--server - A server to connect to automatically when the game launches\n--mem - How much RAM to allocate to the game\n--width - The default width of the window\n--height - The default height of the window\n--branch - The branch to use for the game\n--jvm - Argument to pass to the JVM\n--javaExec - The path to the Java executable\n--storageDir - Directory to use for Lunar Client and mod settings\n--logAddons - Enables coloring certain log messages and prints chat messages directly\n--downloadOnly - Downloads the game and assets without starting it\n--disablePythonSignIn - Disables the use of the Python sign in script\n--quitOnLeave - Quits the game when you leave a server. --server must also be passed. `production.spectrum.moonsworth.cloud.:222` must also be in your server list for this to work.\n--no-optifine - Sets the module in the launch request to lunar-noOF\n--max-threads - Sets the max number of threads for downloading (Default: \(ProcessInfo.processInfo.processorCount))\n--sodium - Uses Sodium instead of OptiFine; compatible with 1.16 and newer\n--launch-override - Overrides an option in the launch request, override formatted as =\n--no-fps-booster - Stops the game from using an FPS Booster (OptiFine or Sodium)\n--neu - Sets NEU (Not Enough Updates) as the module") exit(0) } // Argument checks below @@ -331,10 +331,12 @@ do { lunarCmd.arguments?.append(argv[argv.firstIndex(of: "--server")! + 1]) } if argv.contains("--width") { - lunarCmd.arguments?.append("--width=" + argv[argv.firstIndex(of: "--width")! + 1]) + lunarCmd.arguments?.append("--width") + lunarCmd.arguments?.append(argv[argv.firstIndex(of: "--width")! + 1]) } if argv.contains("--height") { - lunarCmd.arguments?.append("--height=" + argv[argv.firstIndex(of: "--height")! + 1]) + lunarCmd.arguments?.append("--height") + lunarCmd.arguments?.append(argv[argv.firstIndex(of: "--height")! + 1]) } if os == "darwin" { lunarCmd.arguments?.append("-NSRequiresAquaSystemAppearance")