Skip to content

Commit

Permalink
misc: add '-no_console' switch to prevent debug console opening
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyV99 committed Aug 20, 2023
1 parent 97acebb commit 020fb03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/zc/zelda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4532,7 +4532,8 @@ int main(int argc, char **argv)
three_finger_flag=false;

load_game_configs();

if(used_switch(argc, argv, "-no_console"))
zscript_debugger = false;
#ifndef __APPLE__ // Should be done on Mac, too, but I haven't gotten that working
// if(!is_only_instance("zc.lck"))
// {
Expand Down
7 changes: 6 additions & 1 deletion tests/run_replay_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ def on_created(self, event):
parser.add_argument('--show', action=argparse.BooleanOptionalAction, default=False,
help='Alias for --no-headless and --throttle_fps')
parser.add_argument('--emoji', action=argparse.BooleanOptionalAction, default=True)
parser.add_argument('--no_console', action='store_true',
help='Prevent the debug console from opening')


mode_group = parser.add_argument_group('Mode','The playback mode')
Expand Down Expand Up @@ -626,7 +628,10 @@ def start_replay(self, player_args: StartReplayArgs):
exe_args.append('-headless')
elif is_mac_ci:
exe_args.append('-s')


if args.no_console:
exe_args.push('-no_console')

# Allegro seems to be using free'd memory when shutting down the sound system.
# For now, just disable sound in CI or when using Asan/Coverage.
if args.headless and (is_asan or is_coverage or is_ci or mode == 'assert'):
Expand Down

0 comments on commit 020fb03

Please sign in to comment.