summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-04-05 04:35:53 +0200
committerGitHub <noreply@github.com>2019-04-05 04:35:53 +0200
commit9959c95966b0e34d7ce906c47a6c39788ddd9d2a (patch)
tree3e6f248e40bb6c65a8da58cf03880e1c5de81dec
parentMerge pull request #2333 from lioncash/video-include (diff)
parentyuzu/main: Use QStringLiteral where applicable within OnTransferableShaderCacheOpenFile() (diff)
downloadyuzu-9959c95966b0e34d7ce906c47a6c39788ddd9d2a.tar
yuzu-9959c95966b0e34d7ce906c47a6c39788ddd9d2a.tar.gz
yuzu-9959c95966b0e34d7ce906c47a6c39788ddd9d2a.tar.bz2
yuzu-9959c95966b0e34d7ce906c47a6c39788ddd9d2a.tar.lz
yuzu-9959c95966b0e34d7ce906c47a6c39788ddd9d2a.tar.xz
yuzu-9959c95966b0e34d7ce906c47a6c39788ddd9d2a.tar.zst
yuzu-9959c95966b0e34d7ce906c47a6c39788ddd9d2a.zip
-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
void GMainWindow::OnTransferableShaderCacheOpenFile(u64 program_id) {
ASSERT(program_id != 0);
- constexpr char open_target[] = "Transferable Shader Cache";
const QString tranferable_shader_cache_folder_path =
QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::ShaderDir)) + "opengl" +
DIR_SEP + "transferable";
const QString transferable_shader_cache_file_path =
tranferable_shader_cache_folder_path + DIR_SEP +
- QString::fromStdString(fmt::format("{:016X}", program_id)) + ".bin";
+ QString::fromStdString(fmt::format("{:016X}.bin", program_id));
- if (!QFile(transferable_shader_cache_file_path).exists()) {
- QMessageBox::warning(this,
- tr("Error Opening %1 File").arg(QString::fromStdString(open_target)),
- tr("File does not exist!"));
+ if (!QFile::exists(transferable_shader_cache_file_path)) {
+ QMessageBox::warning(this, tr("Error Opening Transferable Shader Cache"),
+ tr("A shader cache for this title does not exist."));
return;
}
- LOG_INFO(Frontend, "Opening {} path for program_id={:016x}", open_target, program_id);
// Windows supports opening a folder with selecting a specified file in explorer. On every other
// OS we just open the transferable shader cache folder without preselecting the transferable
// shader cache file for the selected game.
#if defined(Q_OS_WIN)
- const QString explorer = "explorer";
+ const QString explorer = QStringLiteral("explorer");
QStringList param;
if (!QFileInfo(transferable_shader_cache_file_path).isDir()) {
- param << QLatin1String("/select,");
+ param << QStringLiteral("/select,");
}
param << QDir::toNativeSeparators(transferable_shader_cache_file_path);
QProcess::startDetached(explorer, param);