From b4dd2c93ca2ae2fc6b3a6f13849f6c993f7a6dd2 Mon Sep 17 00:00:00 2001 From: Ulf Wohlers Date: Fri, 25 Oct 2002 16:02:55 +0000 Subject: [PATCH] seperate debugger console setup Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@420 --- include/debug.h | 1 + src/debug/debug.cpp | 9 +++++++-- src/gui/sdlmain.cpp | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/debug.h b/include/debug.h index 69438fa4..d18259bb 100644 --- a/include/debug.h +++ b/include/debug.h @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +void DEBUG_SetupConsole(void); void DEBUG_DrawScreen(void); bool DEBUG_Breakpoint(void); bool DEBUG_IntBreakpoint(Bit8u intNum); diff --git a/src/debug/debug.cpp b/src/debug/debug.cpp index e94e5cdb..3379bc9b 100644 --- a/src/debug/debug.cpp +++ b/src/debug/debug.cpp @@ -946,16 +946,21 @@ static void DEBUG_ProgramStart(Program * * make) { // INIT -void DEBUG_Init(Section* sec) { +void DEBUG_SetupConsole(void) +{ #ifdef WIN32 WIN32_Console(); - #endif + #endif memset((void *)&dbg,0,sizeof(dbg)); debugging=false; dbg.active_win=3; input_count=0; /* Start the Debug Gui */ DBGUI_StartUp(); +}; + +void DEBUG_Init(Section* sec) { + DEBUG_DrawScreen(); /* Add some keyhandlers */ KEYBOARD_AddEvent(KBD_kpminus,0,DEBUG_Enable); diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp index 0f864025..c44e380f 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -518,6 +518,11 @@ void GFX_ShowMsg(char * msg) { }; int main(int argc, char* argv[]) { + +#if C_DEBUG + DEBUG_SetupConsole(); +#endif + try { CommandLine com_line(argc,argv); Config myconf(&com_line);