~ fixed initialize without shared memory

This commit is contained in:
Julian Hinxlage 2019-11-12 15:58:00 +01:00
parent 6220a99e85
commit a42af25abc
1 changed files with 13 additions and 11 deletions

View File

@ -13,17 +13,19 @@ void initialize(int pid) {
impl.sharedMemorySize = 8000;// NOLINT
//set default values
setCharactersPerRow(60);// NOLINT
setCharactersPerColumn(20);// NOLINT
setHeight(600);// NOLINT
setWidth(800);// NOLINT
setMousePosition(42,42);// NOLINT
setBackgroundColor(Color(200,50,20));// NOLINT
setForegroundColor(Color(20,200,50));// NOLINT
setMode(GraphicMode::TrueColor);// NOLINT
setRedrawInterval(20);// NOLINT
setTimerInterruptInterval(10);// NOLINT
if(getSharedMemory() != nullptr) {
//set default values
setCharactersPerRow(60);// NOLINT
setCharactersPerColumn(20);// NOLINT
setHeight(600);// NOLINT
setWidth(800);// NOLINT
setMousePosition(42, 42);// NOLINT
setBackgroundColor(Color(200, 50, 20));// NOLINT
setForegroundColor(Color(20, 200, 50));// NOLINT
setMode(GraphicMode::TrueColor);// NOLINT
setRedrawInterval(20);// NOLINT
setTimerInterruptInterval(10);// NOLINT
}
}
bool registerEvent(EventType type, const std::function<void()> &handler) {