From a1f52fbd1df527d97c221e542ebe5abf905aa58d Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 15 Jan 2003 18:35:07 +0000 Subject: [PATCH] fixes for black on white terminals Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@629 --- src/debug/debug.cpp | 8 ++++++-- src/debug/debug_disasm.cpp | 3 ++- src/debug/debug_gui.cpp | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/debug/debug.cpp b/src/debug/debug.cpp index 204eacb9..42968860 100644 --- a/src/debug/debug.cpp +++ b/src/debug/debug.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 The DOSBox Team + * Copyright (C) 2002 - 2003 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,6 +42,7 @@ void WIN32_Console(); #include #include static struct termios consolesettings; +int old_cursor_state; #endif // Forwards static void DrawCode(void); @@ -1147,8 +1148,11 @@ void DEBUG_SetupConsole(void) static void DEBUG_ShutDown(Section * sec) { CBreakpoint::DeleteAll(); - #ifndef WIN32 + #ifndef WIN32 + curs_set(old_cursor_state); tcsetattr(0, TCSANOW,&consolesettings); + printf("\e[0m\e[2J"); + fflush(NULL); #endif }; diff --git a/src/debug/debug_disasm.cpp b/src/debug/debug_disasm.cpp index 67559cd2..dea4b057 100644 --- a/src/debug/debug_disasm.cpp +++ b/src/debug/debug_disasm.cpp @@ -1112,4 +1112,5 @@ Bitu DasmI386(char* buffer, PhysPt pc, Bitu cur_ip, bool bit32) } -#endif \ No newline at end of file +#endif + diff --git a/src/debug/debug_gui.cpp b/src/debug/debug_gui.cpp index a89b2d87..1c7a6ee6 100644 --- a/src/debug/debug_gui.cpp +++ b/src/debug/debug_gui.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 The DOSBox Team + * Copyright (C) 2002 - 2003 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,6 +31,7 @@ #include "debug.h" #include "debug_inc.h" +extern int old_cursor_state; void DEBUG_ShowMsg(char * msg) { char buf[1024]; strcpy(buf,msg); @@ -125,6 +126,7 @@ void DBGUI_StartUp(void) { #ifndef WIN32 resizeterm(50,80); touchwin(dbg.win_main); + old_cursor_state = curs_set(0); #endif start_color(); cycle_count=0;