git-svn-id: svn://db.shs.com.ru/pip@253 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -94,6 +94,7 @@ void readConsole(int x, int y, int w, int h) {
|
||||
bs.X = w;
|
||||
bs.Y = h;
|
||||
bc.X = bc.Y = 0;
|
||||
memset(chars, 0, w * h * sizeof(CHAR_INFO));
|
||||
ReadConsoleOutput(console, chars, bs, bc, &(sbi.srWindow));
|
||||
for (int i = 0; i < h; ++i)
|
||||
for (int j = 0; j < w; ++j)
|
||||
@@ -115,8 +116,11 @@ void resizeConsole(int w, int h) {
|
||||
con_w = w;
|
||||
con_h = h;
|
||||
GetConsoleScreenBufferInfo(console, &sbi);
|
||||
sbi.srWindow.Left = 0;
|
||||
sbi.srWindow.Right = sbi.srWindow.Left + w - 1;
|
||||
sbi.srWindow.Bottom = sbi.srWindow.Top + h - 1;
|
||||
COORD sz; sz.X = w; sz.Y = h;
|
||||
SetConsoleScreenBufferSize(console, sz);
|
||||
SetConsoleWindowInfo(console, TRUE, &(sbi.srWindow));
|
||||
//system(("mode CON: COLS=" + PIString::fromNumber(w) + " LINES=" + PIString::fromNumber(h)).dataAscii());
|
||||
resizeCells(w, h);
|
||||
|
||||
@@ -347,7 +347,7 @@ void PITerminal::destroy() {
|
||||
waitForFinish(1000);
|
||||
#ifdef WINDOWS
|
||||
if (PRIVATE->pi.hProcess) {
|
||||
piCout << "term";
|
||||
//piCout << "term";
|
||||
//TerminateProcess(PRIVATE->pi.hProcess, 0);
|
||||
GenerateConsoleCtrlEvent(CTRL_C_EVENT, PRIVATE->pi.dwProcessId);
|
||||
CloseHandle(PRIVATE->pi.hProcess);
|
||||
|
||||
@@ -46,7 +46,9 @@ PIPeer::PeerData::PeerData(const PIString & n): PIObject(n) {
|
||||
PIPeer::PeerData::~PeerData() {
|
||||
dt_in.stop();
|
||||
dt_out.stop();
|
||||
t.stop(true);
|
||||
t.stop();
|
||||
if (!t.waitForFinish(1000))
|
||||
t.terminate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user