| 290 | } |
| 291 | |
| 292 | void CDVDsys_SetFile(CDVD_SourceType srctype, std::string newfile) |
| 293 | { |
| 294 | #ifdef WIN32 |
| 295 | if (Path::IsAbsolute(newfile)) |
| 296 | { |
| 297 | const auto splitPath = Path::SplitNativePath(newfile); |
| 298 | // GetDriveType() Requires trailing backslashes |
| 299 | const auto root = fmt::format("{}\\", splitPath.at(0)); |
| 300 | |
| 301 | const auto driveType = GetDriveType(StringUtil::UTF8StringToWideString(root).c_str()); |
| 302 | if (driveType == DRIVE_REMOVABLE) |
| 303 | { |
| 304 | Host::AddIconOSDMessage("RemovableDriveWarning", ICON_FA_TRIANGLE_EXCLAMATION, |
| 305 | TRANSLATE_SV("CDVD", "Game disc location is on a removable drive, performance issues such as jittering " |
| 306 | "and freezing may occur."), |
| 307 | Host::OSD_WARNING_DURATION); |
| 308 | } |
| 309 | } |
| 310 | #endif |
| 311 | |
| 312 | m_SourceFilename[enum_cast(srctype)] = std::move(newfile); |
| 313 | } |
| 314 | |
| 315 | const std::string& CDVDsys_GetFile(CDVD_SourceType srctype) |
| 316 | { |
no test coverage detected