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

Method load

source/ui/data/boxedApp.cpp:23–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#include "../../io/fszip.h"
22
23bool BoxedApp::load(BoxedContainer* container, BString iniFilePath) {
24 this->container = container;
25 this->iniFilePath = iniFilePath;
26 ConfigFile config(iniFilePath);
27
28 this->name = config.readString(B("Name"), B(""));
29 this->link = config.readString(B("Link"), B(""));
30 this->cmd = config.readString(B("Cmd"), B(""));
31 this->iconPath = config.readString(B("Icon"), B(""));
32 this->path = config.readString(B("Path"), B(""));
33 this->resolution = config.readString(B("Resolution"),B(""));
34 this->bpp = config.readInt(B("BPP"),32);
35 this->fullScreen = config.readInt(B("Fullscreen"),FULLSCREEN_NOTSET);
36 this->vsync = config.readInt(B("VSync"), VSYNC_NOT_SET);
37 this->dpiAware = config.readBool(B("DpiAware"), false);
38 this->ddrawOverride = config.readBool(B("DDrawOverride"), false);
39 this->enableDXVK = config.readBool(B("EnableDXVK"), false);
40 this->disableHideCursor = config.readBool(B("DisableHideCursor"), false);
41 this->forceRelativeMouse = config.readBool(B("ForceRelativeMouse"), false);
42 this->autoRefresh = config.readBool(B("AutoRefresh"), false);
43 this->glExt = config.readString(B("AllowedGlExt"),B(""));
44 this->scale = config.readInt(B("Scale"),100);
45 this->scaleQuality = config.readInt(B("ScaleQuality"),0);
46 this->cpuAffinity = config.readInt(B("CpuAffinity"), 0);
47 this->pollRate = config.readInt(B("PollRate"), 0);
48 this->skipFramesFPS = config.readInt(B("SkipFramesFPS"), 0);
49 this->openGlType = config.readInt(B("OpenGL"), OPENGL_TYPE_DEFAULT);
50 this->isWine = config.readBool(B("IsWine"), true);
51 this->uid = config.readInt(B("uid"), -1);
52 this->euid = config.readInt(B("euid"), -1);
53
54 int i = 1;
55 this->args.clear();
56 while (true) {
57 BString key = B("Arg");
58 key += i;
59 BString arg = config.readString(key, B(""));
60 if (arg.length() == 0) {
61 break;
62 }
63 this->args.push_back(arg);
64 i++;
65 }
66 return this->name.length()>0 && (this->cmd.length()>0 || this->link.length()>0);
67}
68
69bool BoxedApp::saveApp() {
70 if (this->iniFilePath.length()==0) {

Callers 15

loadContainersMethod · 0.45
DevSequencerMethod · 0.45
atomic_load_maybeFunction · 0.45
swap_relaxedFunction · 0.45
~ConcurrentQueueMethod · 0.45
ConcurrentQueueMethod · 0.45
try_dequeueMethod · 0.45
try_dequeue_bulkMethod · 0.45
size_approxMethod · 0.45
FreeListMethod · 0.45

Calls 7

BFunction · 0.85
readIntMethod · 0.80
readBoolMethod · 0.80
readStringMethod · 0.45
clearMethod · 0.45
lengthMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected