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

Method setWindowsVersionDefault

source/ui/controls/installView.cpp:223–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223void InstallView::setWindowsVersionDefault() {
224 BString ver = fileSystemVersionControl->getSelectionStringValue();
225 std::shared_ptr<FileSystemZip> fileSystem = GlobalSettings::getAvailableFileSystemFromName(ver);
226
227 if (fileSystem) {
228 windowsVersionControl->setRowHidden(!fileSystem->hasWine());
229
230 if (fileSystem->hasWine()) {
231 U32 minor = fileSystem->wineMinorVersion;
232 U32 major = fileSystem->wineMajorVersion;
233
234 if (major < 2 || (major == 2 && minor < 2)) {
235 windowsVersionControl->setSelectionStringValue(B("Windows XP"));
236 } else if (major > 8 || (major == 8 && minor > 0)) {
237 windowsVersionControl->setSelectionStringValue(B("Windows 10"));
238 } else {
239 windowsVersionControl->setSelectionStringValue(B("Windows 7"));
240 }
241 }
242 }
243}
244
245bool InstallView::saveChanges() {
246 return true;

Callers

nothing calls this directly

Calls 5

BFunction · 0.85
setRowHiddenMethod · 0.80
hasWineMethod · 0.80

Tested by

no test coverage detected