Add --redirect-console option
This commit is contained in:
@@ -651,4 +651,20 @@ class Console
|
||||
petitcom.graphic.GRPFHeight = GRPF.surface.h;
|
||||
GRPF.createTexture(petitcom.renderer, petitcom.textureScaleMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class NativeConsole : Console
|
||||
{
|
||||
File file;
|
||||
this(File file, PetitComputer p)
|
||||
{
|
||||
super(p);
|
||||
this.file = file;
|
||||
}
|
||||
override void printString(wstring text)
|
||||
{
|
||||
super.printString(text);
|
||||
file.write(text);
|
||||
file.flush;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user