From 74c183c2a7fcc980948454d9e9d0c1a449fe7be5 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 11:26:42 -0400 Subject: [PATCH] Add initial Windows Terminal support --- launcher/src/CmderLauncher.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index eb04b49..ea8ccc0 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -510,11 +510,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr if (is_single_mode) { - if (PathFileExists(windowsTerminalDir)) { - swprintf_s(args, L"%s -w 0 nt", args); - } - else - { + if (!PathFileExists(windowsTerminalDir)) { swprintf_s(args, L"%s /single", args); } } @@ -750,21 +746,21 @@ cmderOptions GetOption() cmderOptions.cmderTask = szArgList[i + 1]; i++; } - else if (_wcsicmp(L"/title", szArgList[i]) == 0) + else if (_wcsicmp(L"/title", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) { cmderOptions.cmderTitle = szArgList[i + 1]; i++; } - else if (_wcsicmp(L"/icon", szArgList[i]) == 0) + else if (_wcsicmp(L"/icon", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) { cmderOptions.cmderIcon = szArgList[i + 1]; i++; } - else if (_wcsicmp(L"/single", szArgList[i]) == 0) + else if (_wcsicmp(L"/single", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) { { cmderOptions.cmderSingle = true; } - else if (_wcsicmp(L"/m", szArgList[i]) == 0) + else if (_wcsicmp(L"/m", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) { cmderOptions.cmderUserCfg = false; }