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

Method runOptions

source/ui/data/appFile.cpp:59–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void AppFile::runOptions(BoxedContainer* container, BoxedApp* app, const std::vector<BString>& options, std::list< std::function<bool() > >& runner, std::list<AppDownloadTask>& downloads) {
60 // :TODO: find dependencies, if there are some then delay the other changes
61 bool hasContainerOption = false;
62 BString containerDir = container->getDir();
63
64 for (auto& option : options) {
65 BoxedWinVersion* ver = BoxedwineData::getWinVersionFromName(option);
66 if (ver) {
67 container->setWindowsVersion(*ver);
68 hasContainerOption = true;
69 } else if (option=="GDI") {
70 container->setGDI(true);
71 container->setRenderer(B("gdi"));
72 hasContainerOption = true;
73 } else if (option == "DDraw") {
74 if (app) {
75 app->ddrawOverride = true;
76 }
77 } else if (option == "DXVK=") {
78 if (app) {
79 app->ddrawOverride = option.substr(5).startsWith('t', true);
80 }
81 } else if (option == "DisableHideCursor") {
82 if (app) {
83 app->disableHideCursor = true;
84 }
85 } else if (option == "ForceRelativeMouse") {
86 if (app) {
87 app->forceRelativeMouse = true;
88 }
89 } else if (option.startsWith("glext=")) {
90 if (app) {
91 app->glExt = option.substr(6);
92 }
93 } else if (option=="16bpp") {
94 if (app) {
95 app->bpp = 16;
96 }
97 } else if (option.startsWith("cpuAffinity=")) {
98 if (app) {
99 BString s = option.substr(12);
100 app->cpuAffinity = atoi(s.c_str());
101 }
102 } else if (option.startsWith("wine=")) {
103 continue; // should have already been handled
104 } else if (option.startsWith("resolution=")) {
105 if (app) {
106 app->resolution = option.substr(11);
107 }
108 } else if (option=="macNativeGL") {
109#ifdef __MACH__
110 if (app) {
111 app->openGlType = OPENGL_TYPE_NATIVE;
112 }
113#endif
114 } else {
115 AppFilePtr component = GlobalSettings::getComponentByOptionName(option);
116 if (component) {

Callers

nothing calls this directly

Calls 13

BFunction · 0.85
AppDownloadTaskClass · 0.85
getDirMethod · 0.80
setWindowsVersionMethod · 0.80
setGDIMethod · 0.80
setRendererMethod · 0.80
startsWithMethod · 0.80
substrMethod · 0.80
saveContainerMethod · 0.80
c_strMethod · 0.45
lengthMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected