| 57 | } |
| 58 | |
| 59 | void 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) { |
nothing calls this directly
no test coverage detected