Commit 255ffd7a authored by Rob Swindell's avatar Rob Swindell

Move the external program "pause on exit" implementation back to the C++ code.

Originally, the "pause on exit" was implemented in the C++ version of
sbbs_t::xtrn_sec() and not sbbs_t::exec_xtrn(). This meant that the pause
option was only implemented when the prgoram was invoked from the menu and
not when invoked directly (e.g. via Baja or JS exec_xtrn function).

When sbbs_t::xtrn_sec() was ported to JS, that functionality was also moved
to JS. But it really should have been implemented in exec_xtrn() to begin
with so that regardless of how the program is invoked, that SCFG setting takes
effect.

Thanks to Michael Long for pointing this out.
parent ff90a5a0
Pipeline #504 passed with stage
in 14 minutes and 45 seconds
......@@ -715,15 +715,9 @@ while(bbs.online) {
console.writeln("DOORSCAN ERROR: "+e);
log("Error running "+xtrn_area.sec_list[curr_xtrnsec].prog_list[parseInt(x_prog)].code+" "+e);
}
if(xtrn_area.sec_list[curr_xtrnsec].prog_list[parseInt(x_prog)].settings & XTRN_PAUSE) {
console.pause();
}
}
else {
bbs.exec_xtrn(xtrn_area.sec_list[curr_xtrnsec].prog_list[parseInt(x_prog)].number);
if(xtrn_area.sec_list[curr_xtrnsec].prog_list[parseInt(x_prog)].settings & XTRN_PAUSE)
console.pause();
}
start_mouse();
draw_main(true);
......
......@@ -94,11 +94,6 @@ function exec_xtrn(prog)
load('fonts.js', 'default');
if(options.eval_after_exec)
eval(options.eval_after_exec);
if(prog.settings&XTRN_PAUSE)
console.pause();
else
console.line_counter=0;
}
function external_program_menu(xsec)
......
......@@ -1647,6 +1647,11 @@ bool sbbs_t::exec_xtrn(uint xtrnnum)
thisnode.aux=0;
putnodedat(cfg.node_num,&thisnode);
if(cfg.xtrn[xtrnnum]->misc & XTRN_PAUSE)
pause();
else
lncntr = 0;
return(true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment