Exemplo n.º 1
0
void ScreenBuf::AllocBuf(int X,int Y)
{
	SCOPED_ACTION(CriticalSectionLock)(CS);

	if (X==BufX && Y==BufY)
		return;

	size_t Cnt=X*Y;

	// don't call vector.resize() here:
	// - it's never shrink
	// - we don't care about old content
	resize_nomove(Buf, Cnt);
	resize_nomove(Shadow, Cnt);

	BufX=X;
	BufY=Y;
}
Exemplo n.º 2
0
void SaveScreen::SaveArea(int X1,int Y1,int X2,int Y2)
{
	SaveScreen::X1=X1;
	SaveScreen::Y1=Y1;
	SaveScreen::X2=X2;
	SaveScreen::Y2=Y2;

	// don't call vector.resize() here:
	// - it's never shrink
	// - we don't care about old content
	resize_nomove(ScreenBuf, ScreenBufCharCount());

	GetText(X1, Y1, X2, Y2, ScreenBuf.data(), ScreenBuf.size());
	GetCursorPos(CurPosX,CurPosY);
	GetCursorType(CurVisible,CurSize);
}