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

Method Load

alienfx-gui/ConfigHandler.cpp:163–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163void ConfigHandler::Load() {
164
165 DWORD size_c = 16*sizeof(DWORD);// 4 * 16
166 DWORD activeProfileID = 0;
167
168 GetReg("AutoStart", &startWindows);
169 GetReg("Minimized", &startMinimized);
170 GetReg("UpdateCheck", &updateCheck, 1);
171 GetReg("LightsOn", &lightsOn, 1);
172 GetReg("Dimmed", &dimmed);
173 GetReg("Monitoring", &enableEffects, 1);
174 GetReg("EffectsOnBattery", &effectsOnBattery, 1);
175 GetReg("GammaCorrection", &gammaCorrection, 1);
176 GetReg("DisableAWCC", &awcc_disable);
177 GetReg("ProfileAutoSwitch", &enableProfSwitch);
178 GetReg("OffWithScreen", &offWithScreen);
179 GetReg("NoDesktopSwitch", &noDesktop);
180 GetReg("DimPower", &dimPowerButton);
181 GetReg("DimmedOnBattery", &dimmedBatt);
182 GetReg("TimeoutOn", &actionLights);
183 GetReg("TimeoutLength", &actionTimeout, 30);
184 GetReg("ActiveProfile", &activeProfileID);
185 GetReg("OffPowerButton", &offPowerButton);
186 //GetReg("EsifTemp", &esif_temp);
187 GetReg("DimmingPower", &dimmingPower, 164);
188 GetReg("FullPower", &fullPower, 255);
189 GetReg("OffOnBattery", &offOnBattery);
190 GetReg("FanControl", &fanControl, 1);
191 GetReg("FansOnBattery", &fansOnBattery, 1);
192 GetReg("ShowGridNames", &showGridNames);
193 GetReg("KeyboardShortcut", &keyShortcuts, 1);
194 GetReg("GESpeed", &geTact, 100);
195 GetReg("MonDC", &dcFreq, 0);
196
197 RegGetValue(hKeyMain, NULL, TEXT("CustomColors"), RRF_RT_REG_BINARY | RRF_ZEROONFAILURE, NULL, customColors, &size_c);
198
199 // Ambient....
200 GetReg("Ambient-Shift", &amb_shift, 40);
201 GetReg("Ambient-Calc", &amb_calc);
202 GetReg("Ambient-Mode", &amb_mode);
203 GetReg("Ambient-Grid", &amb_grid.ag, 0x30004);
204
205 // Haptics....
206 GetReg("Haptics-Input", &hap_inpType);
207
208 accentColor = GetAccentColor();
209
210 char name[256];
211 int pid, appid, profID, groupID, recSize;
212 BYTE* data = NULL;
213 DWORD len = 255, lend = 0;
214 profile* prof;
215 groupset* gset;
216 byte cbsize = 2 * sizeof(DWORD) + 3;
217
218 // Profiles...
219 for (int vindex = 0; lend = GetRegData(hKeyProfiles, vindex, name, &data); vindex++) {
220 if (sscanf_s(name, "Profile-%d", &pid) == 1) {

Callers 1

wWinMainFunction · 0.45

Calls 3

GetRegDataFunction · 0.85
GetRegStringFunction · 0.85
AddSensorCurveMethod · 0.80

Tested by

no test coverage detected