Skip to content

Commit b60a095

Browse files
committed
do not pass on Output() if we have been started from workbench so we avoid a CONSOLE: window being opened
1 parent 78fa575 commit b60a095

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/compiler/aqb.c

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ extern struct DOSBase *DOSBase;
6060
char aqb_home[PATH_MAX];
6161
char aqb_lib[PATH_MAX];
6262
char aqb_help[PATH_MAX];
63+
bool aqb_wbstart = FALSE;
6364

6465
static void print_usage(char *argv[])
6566
{
@@ -329,6 +330,7 @@ int main (int argc, char *argv[])
329330
#ifdef __amigaos__
330331
if (argc == 0) // workbench launch
331332
{
333+
aqb_wbstart = TRUE;
332334
struct WBStartup *wb_msg = (struct WBStartup *) argv;
333335
struct WBArg *wbarg = wb_msg->sm_ArgList;
334336
for (uint16_t i=0; i < wb_msg->sm_NumArgs; i++, wbarg++)

src/compiler/options.h

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
extern char aqb_home[PATH_MAX];
1212
extern char aqb_lib[PATH_MAX];
1313
extern char aqb_help[PATH_MAX];
14+
extern bool aqb_wbstart;
1415

1516
/*
1617
* compiler options

src/compiler/run.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "run.h"
55
#include "logger.h"
66
#include "ui.h"
7+
#include "options.h"
78

89
static RUN_state g_debugState = RUN_stateStopped;
910

@@ -94,7 +95,7 @@ static void _launch_process (RUN_env env, char *binfn, char *arg1, bool dbg)
9495
env->childProc = CreateNewProcTags(NP_Seglist, (ULONG) env->seglist,
9596
NP_FreeSeglist, FALSE,
9697
NP_Input, 0l,
97-
NP_Output, Output(),
98+
NP_Output, aqb_wbstart ? 0 : Output(),
9899
NP_CloseInput, FALSE,
99100
NP_CloseOutput, FALSE,
100101
NP_StackSize, DEFAULT_STACKSIZE,

0 commit comments

Comments
 (0)