Skip to content

Commit f9a07b3

Browse files
fix: local var supposed to be public
1 parent ed4b19e commit f9a07b3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ std::string version = []() {
105105
#endif
106106
}();
107107
thread_local std::string currentParentExe = ""; // to store the name of our own parent process for error hints
108+
bool virtualTerminalEnabled = false; // cached result of virtual terminal check to avoid repeated function calls
108109

109110
std::string WideToString(const std::wstring& wstr);
110111

@@ -2032,7 +2033,7 @@ ProcInfos findMyProc(const char *procname, HANDLE hSnapshot) {
20322033

20332034
int main(int argc, char* argv[]) {
20342035
SetConsoleOutputCP(CP_UTF8);
2035-
bool virtualTerminalEnabled = IsVirtualTerminalModeEnabled();
2036+
virtualTerminalEnabled = IsVirtualTerminalModeEnabled();
20362037
for (int i = 0; i < argc; ++i) {
20372038
std::string arg = argv[i];
20382039

0 commit comments

Comments
 (0)