MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / openTextureFolderForGame

Method openTextureFolderForGame

pcsx2-qt/MainWindow.cpp:3412–3428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3410}
3411
3412void MainWindow::openTextureFolderForGame(const GameList::Entry& entry)
3413{
3414 const std::string serial = entry.serial;
3415 const std::string game_texture_dir = Path::Combine(EmuFolders::Textures, serial);
3416
3417 // Make sure the per-game directory exists or that we can successfully create it.
3418 if (FileSystem::DirectoryExists(game_texture_dir.c_str()) || FileSystem::CreateDirectoryPath(game_texture_dir.c_str(), false))
3419 {
3420 const QFileInfo fi(QString::fromStdString(game_texture_dir));
3421 QtUtils::OpenURL(this, QUrl::fromLocalFile(fi.absoluteFilePath()));
3422 return;
3423 }
3424
3425 QMessageBox::critical(this, tr("Error"), tr("Failed to create game texture directory '%1'\n\nOpening default directory.").arg(QString::fromStdString(game_texture_dir)));
3426
3427 QtUtils::OpenURL(this, QUrl::fromLocalFile(QString::fromStdString(EmuFolders::Textures)));
3428}
3429
3430void MainWindow::openMemoryCardFolder()
3431{

Callers

nothing calls this directly

Calls 4

CombineFunction · 0.85
OpenURLFunction · 0.85
argMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected