mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
yuzu/main: Make open_target a QString
Simplifies the amount of string conversions necessary. We also don't need to log out what occurs here.
This commit is contained in:
parent
ba4e1adda1
commit
872d480c60
|
@ -1087,7 +1087,7 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target
|
||||||
void GMainWindow::OnTransferableShaderCacheOpenFile(u64 program_id) {
|
void GMainWindow::OnTransferableShaderCacheOpenFile(u64 program_id) {
|
||||||
ASSERT(program_id != 0);
|
ASSERT(program_id != 0);
|
||||||
|
|
||||||
constexpr char open_target[] = "Transferable Shader Cache";
|
const QString open_target = QStringLiteral("Transferable Shader Cache");
|
||||||
const QString tranferable_shader_cache_folder_path =
|
const QString tranferable_shader_cache_folder_path =
|
||||||
QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::ShaderDir)) + "opengl" +
|
QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::ShaderDir)) + "opengl" +
|
||||||
DIR_SEP + "transferable";
|
DIR_SEP + "transferable";
|
||||||
|
@ -1097,12 +1097,10 @@ void GMainWindow::OnTransferableShaderCacheOpenFile(u64 program_id) {
|
||||||
QString::fromStdString(fmt::format("{:016X}", program_id)) + ".bin";
|
QString::fromStdString(fmt::format("{:016X}", program_id)) + ".bin";
|
||||||
|
|
||||||
if (!QFile::exists(transferable_shader_cache_file_path)) {
|
if (!QFile::exists(transferable_shader_cache_file_path)) {
|
||||||
QMessageBox::warning(this,
|
QMessageBox::warning(this, tr("Error Opening %1 File").arg(open_target),
|
||||||
tr("Error Opening %1 File").arg(QString::fromStdString(open_target)),
|
|
||||||
tr("File does not exist!"));
|
tr("File does not exist!"));
|
||||||
return;
|
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
|
// 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
|
// OS we just open the transferable shader cache folder without preselecting the transferable
|
||||||
|
|
Loading…
Reference in a new issue