| 853 | } |
| 854 | |
| 855 | void GlobalSettings::downloadFileSystem(const std::shared_ptr<FileSystemZip>& version, std::function<void(bool)> onCompleted) { |
| 856 | runOnMainUI([version, onCompleted]() { |
| 857 | BString filePath = version->getLocalFilePath(); |
| 858 | if (!Fs::doesNativePathExist(GlobalSettings::getFileSystemFolder())) { |
| 859 | Fs::makeNativeDirs(GlobalSettings::getFileSystemFolder()); |
| 860 | } |
| 861 | std::vector<DownloadItem> items; |
| 862 | items.push_back(DownloadItem(getTranslationWithFormat(Msg::DOWNLOADDLG_LABEL, true, version->name), version->filePath, version->filePathBackup, filePath, ((U64)(version->size)) * 1024 * 1024)); |
| 863 | std::shared_ptr<FileSystemZip> depend = version->getMissingDependency(); |
| 864 | if (depend) { |
| 865 | items.push_back(DownloadItem(getTranslationWithFormat(Msg::DOWNLOADDLG_LABEL, true, depend->name), depend->filePath, depend->filePathBackup, depend->getLocalFilePath(), ((U64)(depend->size)) * 1024 * 1024)); |
| 866 | } |
| 867 | new DownloadDlg(Msg::DOWNLOADDLG_TITLE, items, [onCompleted](bool success) { |
| 868 | runOnMainUI([success, onCompleted]() { |
| 869 | GlobalSettings::reloadWineVersions(); |
| 870 | if (!GlobalSettings::defaultFont) { |
| 871 | GlobalSettings::restartUI = true; |
| 872 | } |
| 873 | if (onCompleted) { |
| 874 | onCompleted(success); |
| 875 | } |
| 876 | return false; |
| 877 | }); |
| 878 | }); |
| 879 | return false; |
| 880 | }); |
| 881 | } |
| 882 | |
| 883 | void GlobalSettings::useFastFrameRate(bool useFast) { |
| 884 | if (useFast) { |
nothing calls this directly
no test coverage detected