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

Method setCurrentApp

source/ui/controls/containersView.cpp:647–699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

645}
646
647void ContainersView::setCurrentApp(BoxedApp* app) {
648 this->currentApp = app;
649 appNameControl->setText(app->getName());
650 appGlExControl->setText(app->glExt);
651
652
653 if (app->link.length()) {
654 appPathControl->setText(app->link);
655 } else {
656 appPathControl->setText(app->path+"/"+app->cmd);
657 }
658 BString args;
659 for (auto& arg : app->args) {
660 if (args.length()) {
661 args += "\n";
662 }
663 args += arg;
664 }
665 appArgumentsControl->setText(args);
666 appArgumentsControl->setNumberOfLines((int)app->args.size() + 1);
667 appResolutionControl->setSelectionByLabel(app->resolution);
668 appBppControl->setSelectionIntValue(app->bpp);
669
670 if (app->fullScreen != FULLSCREEN_NOTSET) {
671 appScaleControl->setSelection(0);
672 } else {
673 appScaleControl->setSelectionIntValue(app->scale);
674 }
675 appScaleControl->setReadOnly(app->fullScreen != FULLSCREEN_NOTSET);
676 appScaleQualityControl->setSelection(app->scaleQuality);
677 if (this->appOpenGlControl) {
678 appOpenGlControl->setSelectionIntValue(app->openGlType);
679 }
680 appFullScreenControl->setSelectionIntValue(app->fullScreen);
681 appVSyncControl->setSelectionIntValue(app->vsync);
682 appDpiAwareControl->setCheck(app->dpiAware);
683 appDdrawOverrideControl->setCheck(app->ddrawOverride);
684 appEnableDXVKControl->setCheck(app->enableDXVK);
685 appDisableHideCursorControl->setCheck(app->disableHideCursor);
686 appForceRelativeMouseControl->setCheck(app->forceRelativeMouse);
687 appPollRateControl->setText(BString::valueOf(app->pollRate));
688 appSkipFramesControl->setText(BString::valueOf(app->skipFramesFPS));
689#ifdef _DEBUG
690 appDirectDrawAutoRefreshControl->setCheck(app->autoRefresh);
691 std::shared_ptr<FileSystemZip> fileSystem = GlobalSettings::getInstalledFileSystemFromName(this->containerFileSystemControl->getSelectionStringValue());
692 bool hasAutoRefresh = fileSystem && atoi(fileSystem->fsVersion.c_str()) >= 7 && fileSystem->hasWine();
693 appDirectDrawAutoRefreshControl->setReadOnly(!hasAutoRefresh);
694 appDirectDrawAutoRefreshControl->setHelpId(hasAutoRefresh ? Msg::CONTAINER_VIEW_AUTO_REFRESH_HELP : Msg::CONTAINER_VIEW_AUTO_REFRESH_MISSING_HELP);
695#endif
696#ifdef BOXEDWINE_MULTI_THREADED
697 appCpuAffinityControl->setSelectionIntValue(app->cpuAffinity);
698#endif
699}
700
701void ContainersView::rebuildShortcutsCombobox() {
702 std::vector<ComboboxItem> apps;

Callers 1

ContainersViewMethod · 0.95

Calls 14

setNumberOfLinesMethod · 0.80
setSelectionByLabelMethod · 0.80
setSelectionIntValueMethod · 0.80
setSelectionMethod · 0.80
setReadOnlyMethod · 0.80
setCheckMethod · 0.80
hasWineMethod · 0.80
setHelpIdMethod · 0.80
setTextMethod · 0.45
getNameMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected