MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / save

Function save

Tactility/Source/settings/KeyboardSettings.cpp:51–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51bool save(const KeyboardSettings& settings) {
52 std::map<std::string, std::string> map;
53 map[KEY_BACKLIGHT_ENABLED] = settings.backlightEnabled ? "1" : "0";
54 map[KEY_BACKLIGHT_BRIGHTNESS] = std::to_string(settings.backlightBrightness);
55 map[KEY_BACKLIGHT_TIMEOUT_ENABLED] = settings.backlightTimeoutEnabled ? "1" : "0";
56 map[KEY_BACKLIGHT_TIMEOUT_MS] = std::to_string(settings.backlightTimeoutMs);
57 return file::savePropertiesFile(SETTINGS_FILE, map);
58}
59
60}

Callers

nothing calls this directly

Calls 1

savePropertiesFileFunction · 0.85

Tested by

no test coverage detected