MCPcopy Create free account
hub / github.com/T-Troll/alienfx-tools / Load

Method Load

alienfx-mon/ConfigMon.cpp:36–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36void ConfigMon::Load() {
37 GetReg("AutoStart", &startWindows);
38 GetReg("Minimized", &startMinimized);
39 GetReg("UpdateCheck", &updateCheck, 1);
40 GetReg("wSensors", &wSensors, 1);
41 GetReg("eSensors", &eSensors);
42 GetReg("bSensors", &bSensors);
43 GetReg("Refresh", &refreshDelay, 500);
44
45 char name[256];
46 int src;
47 DWORD id, lend = 0;
48 byte* data = NULL;
49
50 for (int vindex = 0; lend = GetRegData(hKeySensors, vindex, name, &data); vindex++) {
51 if (sscanf_s(name, "%d-%ud", &src, &id) == 2) {
52 switch (src) {
53 case 0: active_sensors[id].name = GetRegString(data,lend); break;
54 case 1: active_sensors[id].flags = *(DWORD*)data; break;
55 case 2: active_sensors[id].traycolor = *(DWORD*)data; break;
56 case 3: active_sensors[id].alarmPoint = *(DWORD*)data;
57 }
58 }
59 }
60 if (data)
61 delete[] data;
62}
63
64void ConfigMon::Save() {
65

Callers

nothing calls this directly

Calls 2

GetRegDataFunction · 0.85
GetRegStringFunction · 0.85

Tested by

no test coverage detected