public ConsoleServer() { Sequence = new List <char>(); ITextConsoleDevice txtDev; var fb = FrameBuffer.Create(); if (fb != null) { var surface = new FramebufferSurface(fb); var gfx = new GraphicsAdapter(surface); var fbTxt = new FrameBufferTextScreenDevice(gfx); txtDev = fbTxt; } else { var biosScreen = new BiosTextConsoleDevice(); biosScreen.Initialize(); txtDev = biosScreen; } Dev = new ConsoleDevice(); Dev.Initialize(txtDev); }
public unsafe ConsoleBuffer(ConsoleDevice dev) { Rows = dev.Rows; Columns = dev.Columns; Chars = (ConsoleChar *)RuntimeMemory.AllocateCleared(sizeof(ConsoleChar) * Rows * Columns); }