From 7e8381037eb7f689ccb0457052f8f32aeb018301 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 7 Dec 2012 20:40:30 +0000 Subject: [PATCH] Fix crash on exit on gnome-terminal 3.4.1.1 Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3805 --- src/debug/debug.cpp | 9 +++++---- src/debug/debug_gui.cpp | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/debug/debug.cpp b/src/debug/debug.cpp index 7b76d573..8a3846c6 100644 --- a/src/debug/debug.cpp +++ b/src/debug/debug.cpp @@ -2105,8 +2105,9 @@ void DEBUG_SetupConsole(void) { WIN32_Console(); #else tcgetattr(0,&consolesettings); - printf("\e[8;50;80t"); //resize terminal - fflush(NULL); + //curses must be inited first in order to catch the resize (is an event) +// printf("\e[8;50;80t"); //resize terminal +// fflush(NULL); #endif memset((void *)&dbg,0,sizeof(dbg)); debugging=false; @@ -2123,8 +2124,8 @@ void DEBUG_ShutDown(Section * /*sec*/) { #ifndef WIN32 tcsetattr(0, TCSANOW,&consolesettings); // printf("\e[0m\e[2J"); //Seems to destroy scrolling - printf("\ec"); - fflush(NULL); +// printf("\ec"); //Doesn't seem to be needed anymore +// fflush(NULL); #endif } diff --git a/src/debug/debug_gui.cpp b/src/debug/debug_gui.cpp index 44adfd4a..d1b8bbc4 100644 --- a/src/debug/debug_gui.cpp +++ b/src/debug/debug_gui.cpp @@ -274,6 +274,8 @@ void DBGUI_StartUp(void) { nodelay(dbg.win_main,true); keypad(dbg.win_main,true); #ifndef WIN32 + printf("\e[8;50;80t"); + fflush(NULL); resizeterm(50,80); touchwin(dbg.win_main); #endif