| 645 | } |
| 646 | |
| 647 | void 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 | |
| 701 | void ContainersView::rebuildShortcutsCombobox() { |
| 702 | std::vector<ComboboxItem> apps; |
no test coverage detected