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);
|
||||
|
||||
Reference in New Issue
Block a user