fixed default values

This commit is contained in:
Julian Hinxlage 2020-01-07 15:22:17 +01:00
parent 09de960071
commit eaf2c77dda
2 changed files with 12 additions and 10 deletions

View File

@ -1,15 +1,15 @@
#defaultKey = 12345
#newKey = 0
layoutVersion = 0
width = 0
height = 0
mode = 0
redrawInterval = 0
timerInterruptInterval = 0
width = 800
height = 600
mode = 4
redrawInterval = 500
timerInterruptInterval = 1000
backgroundColor = 0
foregroundColor = 0
charactersPerRow = 0
charactersPerColumn = 0
font = 0
foregroundColor = 0xffffff
charactersPerRow = 60
charactersPerColumn = 20
font = 4
mousePositionX = 0
mousePositionY = 0

View File

@ -78,6 +78,7 @@ void getConfig() {
int height = config->get_as<int>("height").value_or(0);
int mode = config->get_as<int>("mode").value_or(0);
int timerInterruptInterval = config->get_as<int>("timerInterruptInterval").value_or(0);
int redrawInterval = config->get_as<int>("redrawInterval").value_or(0);
int backgroundColor = config->get_as<int>("backgroundColor").value_or(0);
int foregroundColor = config->get_as<int>("foregroundColor").value_or(0);
int charactersPerRow = config->get_as<int>("charactersPerRow").value_or(0);
@ -99,11 +100,12 @@ void getConfig() {
vkvm::setHeight(height);
vkvm::setMode((vkvm::GraphicMode) mode);
vkvm::setTimerInterruptInterval(timerInterruptInterval);
vkvm::setRedrawInterval(redrawInterval);
vkvm::setBackgroundColor(vkvm::Color(backgroundColor));
vkvm::setForegroundColor(vkvm::Color(foregroundColor));
vkvm::setCharactersPerRow(charactersPerRow);
vkvm::setCharactersPerColumn(charactersPerColumn);
vkvm::setFont(vkvm::FontType::ProFontIIX);
vkvm::setFont(static_cast<vkvm::FontType>(font));
vkvm::setMousePosition(mousePositionX, mousePositionY);
}