mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-03 13:41:59 -07:00
set default var if not present in config
This commit is contained in:
@@ -11,6 +11,10 @@
|
||||
#include <iostream>
|
||||
|
||||
CConfigManager::CConfigManager() {
|
||||
setDefaultVars();
|
||||
}
|
||||
|
||||
void CConfigManager::setDefaultVars() {
|
||||
configValues["general:max_fps"].intValue = 240;
|
||||
configValues["general:sensitivity"].floatValue = 0.25f;
|
||||
configValues["general:apply_sens_to_raw"].intValue = 1;
|
||||
@@ -309,7 +313,9 @@ void CConfigManager::loadConfigLoadVars() {
|
||||
Debug::log(LOG, "Reloading the config!");
|
||||
parseError = ""; // reset the error
|
||||
currentCategory = ""; // reset the category
|
||||
configValues["autogenerated"].intValue = 0; // reset autogenerated status
|
||||
|
||||
// reset all vars before loading
|
||||
setDefaultVars();
|
||||
|
||||
m_dMonitorRules.clear();
|
||||
m_dWindowRules.clear();
|
||||
|
Reference in New Issue
Block a user