Skip to content

Commit

Permalink
Fix some console window behavior on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Jan 2, 2024
1 parent f92de2a commit ce12178
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ int main(int argc, char *argv[])

// Run unit tests
if (cmd_args.getFlag("run-unittests")) {
porting::attachOrCreateConsole();
#if BUILD_UNITTESTS
if (cmd_args.exists("test-module"))
return run_tests(cmd_args.get("test-module")) ? 0 : 1;
Expand All @@ -228,6 +229,7 @@ int main(int argc, char *argv[])

// Run benchmarks
if (cmd_args.getFlag("run-benchmarks")) {
porting::attachOrCreateConsole();
#if BUILD_BENCHMARKS
if (cmd_args.exists("test-module"))
return run_benchmarks(cmd_args.get("test-module").c_str()) ? 0 : 1;
Expand Down Expand Up @@ -635,6 +637,7 @@ static bool use_debugger(int argc, char *argv[])
continue;
new_args.push_back(argv[i]);
}
new_args.push_back("--console");
new_args.push_back(nullptr);

#ifdef _WIN32
Expand Down

0 comments on commit ce12178

Please sign in to comment.