summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/yuzu/main.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 8a2a00388..2b9db69a3 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1090,31 +1090,28 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target
1090void GMainWindow::OnTransferableShaderCacheOpenFile(u64 program_id) { 1090void GMainWindow::OnTransferableShaderCacheOpenFile(u64 program_id) {
1091 ASSERT(program_id != 0); 1091 ASSERT(program_id != 0);
1092 1092
1093 constexpr char open_target[] = "Transferable Shader Cache";
1094 const QString tranferable_shader_cache_folder_path = 1093 const QString tranferable_shader_cache_folder_path =
1095 QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::ShaderDir)) + "opengl" + 1094 QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::ShaderDir)) + "opengl" +
1096 DIR_SEP + "transferable"; 1095 DIR_SEP + "transferable";
1097 1096
1098 const QString transferable_shader_cache_file_path = 1097 const QString transferable_shader_cache_file_path =
1099 tranferable_shader_cache_folder_path + DIR_SEP + 1098 tranferable_shader_cache_folder_path + DIR_SEP +
1100 QString::fromStdString(fmt::format("{:016X}", program_id)) + ".bin"; 1099 QString::fromStdString(fmt::format("{:016X}.bin", program_id));
1101 1100
1102 if (!QFile(transferable_shader_cache_file_path).exists()) { 1101 if (!QFile::exists(transferable_shader_cache_file_path)) {
1103 QMessageBox::warning(this, 1102 QMessageBox::warning(this, tr("Error Opening Transferable Shader Cache"),
1104 tr("Error Opening %1 File").arg(QString::fromStdString(open_target)), 1103 tr("A shader cache for this title does not exist."));
1105 tr("File does not exist!"));
1106 return; 1104 return;
1107 } 1105 }
1108 LOG_INFO(Frontend, "Opening {} path for program_id={:016x}", open_target, program_id);
1109 1106
1110 // Windows supports opening a folder with selecting a specified file in explorer. On every other 1107 // Windows supports opening a folder with selecting a specified file in explorer. On every other
1111 // OS we just open the transferable shader cache folder without preselecting the transferable 1108 // OS we just open the transferable shader cache folder without preselecting the transferable
1112 // shader cache file for the selected game. 1109 // shader cache file for the selected game.
1113#if defined(Q_OS_WIN) 1110#if defined(Q_OS_WIN)
1114 const QString explorer = "explorer"; 1111 const QString explorer = QStringLiteral("explorer");
1115 QStringList param; 1112 QStringList param;
1116 if (!QFileInfo(transferable_shader_cache_file_path).isDir()) { 1113 if (!QFileInfo(transferable_shader_cache_file_path).isDir()) {
1117 param << QLatin1String("/select,"); 1114 param << QStringLiteral("/select,");
1118 } 1115 }
1119 param << QDir::toNativeSeparators(transferable_shader_cache_file_path); 1116 param << QDir::toNativeSeparators(transferable_shader_cache_file_path);
1120 QProcess::startDetached(explorer, param); 1117 QProcess::startDetached(explorer, param);