Set AllKeymapsCount only once when applying a configuration

This commit is contained in:
Eric Tang
2017-08-08 12:40:19 -07:00
parent 31de620fee
commit b07aba1766
2 changed files with 3 additions and 1 deletions

View File

@@ -43,5 +43,8 @@ parser_error_t ParseConfig(config_buffer_t *buffer) {
return errorCode; return errorCode;
} }
} }
if (!ParserRunDry) {
AllKeymapsCount = keymapCount;
}
return ParserError_Success; return ParserError_Success;
} }

View File

@@ -197,7 +197,6 @@ parser_error_t ParseKeymap(config_buffer_t *buffer, uint8_t keymapIdx, uint8_t k
return ParserError_InvalidLayerCount; return ParserError_InvalidLayerCount;
} }
if (!ParserRunDry) { if (!ParserRunDry) {
AllKeymapsCount = keymapCount;
AllKeymaps[keymapIdx].abbreviation = abbreviation; AllKeymaps[keymapIdx].abbreviation = abbreviation;
AllKeymaps[keymapIdx].abbreviationLen = abbreviationLen; AllKeymaps[keymapIdx].abbreviationLen = abbreviationLen;
AllKeymaps[keymapIdx].offset = offset; AllKeymaps[keymapIdx].offset = offset;