debugger fixes under linux
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@624
This commit is contained in:
parent
036ac5a298
commit
3642056686
2 changed files with 19 additions and 10 deletions
|
@ -38,8 +38,11 @@
|
|||
|
||||
#ifdef WIN32
|
||||
void WIN32_Console();
|
||||
#else
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
static struct termios consolesettings;
|
||||
#endif
|
||||
|
||||
// Forwards
|
||||
static void DrawCode(void);
|
||||
static bool DEBUG_Log_Loop(int count);
|
||||
|
@ -855,6 +858,7 @@ Bit32u DEBUG_CheckKeys(void) {
|
|||
case 0x0A: codeViewData.inputMode = FALSE;
|
||||
ParseCommand(codeViewData.inputStr);
|
||||
break;
|
||||
case 0x107: //backspace (linux)
|
||||
case 0x08: // delete
|
||||
if (strlen(codeViewData.inputStr)>0) codeViewData.inputStr[strlen(codeViewData.inputStr)-1] = 0;
|
||||
break;
|
||||
|
@ -1126,9 +1130,10 @@ void DEBUG_SetupConsole(void)
|
|||
{
|
||||
#ifdef WIN32
|
||||
WIN32_Console();
|
||||
#else
|
||||
printf("\e[8;50;80t"); //resize terminal
|
||||
fflush(NULL);
|
||||
#else
|
||||
tcgetattr(0,&consolesettings);
|
||||
printf("\e[8;50;80t"); //resize terminal
|
||||
fflush(NULL);
|
||||
#endif
|
||||
memset((void *)&dbg,0,sizeof(dbg));
|
||||
debugging=false;
|
||||
|
@ -1141,6 +1146,9 @@ void DEBUG_SetupConsole(void)
|
|||
static void DEBUG_ShutDown(Section * sec)
|
||||
{
|
||||
CBreakpoint::DeleteAll();
|
||||
#ifndef WIN32
|
||||
tcsetattr(0, TCSANOW,&consolesettings);
|
||||
#endif
|
||||
};
|
||||
|
||||
void DEBUG_Init(Section* sec) {
|
||||
|
|
|
@ -118,14 +118,15 @@ static void MakePairs(void) {
|
|||
void DBGUI_StartUp(void) {
|
||||
/* Start the main window */
|
||||
dbg.win_main=initscr();
|
||||
cbreak(); /* take input chars one at a time, no wait for \n */
|
||||
noecho(); /* don't echo input */
|
||||
cbreak(); /* take input chars one at a time, no wait for \n */
|
||||
noecho(); /* don't echo input */
|
||||
nodelay(dbg.win_main,true);
|
||||
keypad(dbg.win_main,true);
|
||||
#ifndef WIN32
|
||||
resizeterm(50,80);
|
||||
touchwin(dbg.win_main);
|
||||
#endif
|
||||
#ifndef WIN32
|
||||
resizeterm(50,80);
|
||||
touchwin(dbg.win_main);
|
||||
#endif
|
||||
start_color();
|
||||
cycle_count=0;
|
||||
MakePairs();
|
||||
MakeSubWindows();
|
||||
|
|
Loading…
Add table
Reference in a new issue