Debugger: added auto-run of 'DebuggerAutoRun.txt' on startup. (#666)

This commit is contained in:
tomcw 2019-10-11 21:24:01 +01:00
parent 319797df69
commit 75f6ab9e59

View File

@ -6485,12 +6485,9 @@ Update_t CmdOutputRun (int nArgs)
else
{
char sText[ CONSOLE_WIDTH ];
ConsolePrintFormat( sText, "%sCouldn't load filename: %s%s"
, CHC_ERROR
, CHC_STRING
, sFileName.c_str()
);
}
ConsolePrintFormat(sText, "%sCouldn't load filename:", CHC_ERROR);
ConsolePrintFormat(sText, "%s%s", CHC_STRING, sFileName.c_str());
}
return ConsoleUpdate();
}
@ -8987,6 +8984,15 @@ void DebugInitialize ()
_Bookmark_Reset();
static bool doneAutoRun = false;
if (!doneAutoRun) // Don't re-run on a VM restart
{
doneAutoRun = true;
std::string pathname = g_sProgramDir + "DebuggerAutoRun.txt";
strcpy_s(g_aArgs[1].sArg, MAX_ARG_LEN, pathname.c_str());
CmdOutputRun(1);
}
CmdMOTD(0);
}