MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / saveConfig

Method saveConfig

source/ui/data/globalSettings.cpp:191–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191void GlobalSettings::saveConfig() {
192 ConfigFile config(GlobalSettings::configFilePath);
193 config.writeString(B("Version"), B("1"));
194 config.writeString(B("DataFolder"), GlobalSettings::dataFolderLocation);
195 config.writeString(B("Theme"), GlobalSettings::theme);
196 config.writeString(B("DefaultResolution"), GlobalSettings::defaultResolution);
197 config.writeInt(B("DefaultScale"), GlobalSettings::defaultScale);
198 config.writeInt(B("DefaultVsync"), GlobalSettings::defaultVsync);
199 config.writeInt(B("FontScale"), (int)(GlobalSettings::fontScale*100));
200 // don't save this so that it can be updated each release, but if someone wants to override it by entering a value they can
201 //config.writeString("FilesURL", GlobalSettings::filesUrl);
202 config.writeInt(B("WindowWidth"), GlobalSettings::lastScreenCx);
203 config.writeInt(B("WindowHeight"), GlobalSettings::lastScreenCy);
204 config.writeInt(B("WindowX"), GlobalSettings::lastScreenX);
205 config.writeInt(B("WindowY"), GlobalSettings::lastScreenY);
206 config.writeInt(B("OpenGL"), GlobalSettings::defaultOpenGL);
207 config.writeBool(B("EnableAutomation"), GlobalSettings::enabledAutomation);
208 config.writeBool(B("EnabledCachedReadFiles"), GlobalSettings::enabledCachedReadFiles);
209
210 config.saveChanges();
211}
212
213BString GlobalSettings::getFileFromWineVersion(int wineVersion) {
214 for (auto& ver : GlobalSettings::fileSystemVersions) {

Callers

nothing calls this directly

Calls 5

BFunction · 0.85
writeStringMethod · 0.80
writeIntMethod · 0.80
writeBoolMethod · 0.80
saveChangesMethod · 0.45

Tested by

no test coverage detected