summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-06 20:49:21 +0200
committerLioncash <mathew1800@gmail.com>2018-08-06 21:06:30 +0200
commita5ac53dd4ce8079741dd48066195b019ea1611fa (patch)
treecbfc740369233d3b21e6282351f8cb6a4b0a6c85
parentMerge pull request #933 from lioncash/memory (diff)
downloadyuzu-a5ac53dd4ce8079741dd48066195b019ea1611fa.tar
yuzu-a5ac53dd4ce8079741dd48066195b019ea1611fa.tar.gz
yuzu-a5ac53dd4ce8079741dd48066195b019ea1611fa.tar.bz2
yuzu-a5ac53dd4ce8079741dd48066195b019ea1611fa.tar.lz
yuzu-a5ac53dd4ce8079741dd48066195b019ea1611fa.tar.xz
yuzu-a5ac53dd4ce8079741dd48066195b019ea1611fa.tar.zst
yuzu-a5ac53dd4ce8079741dd48066195b019ea1611fa.zip
-rw-r--r--src/yuzu/game_list.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index 71e24a9e2..166c16225 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -368,21 +368,23 @@ void GameList::LoadInterfaceLayout() {
const QStringList GameList::supported_file_extensions = {"nso", "nro", "nca", "xci"};
static bool HasSupportedFileExtension(const std::string& file_name) {
- QFileInfo file = QFileInfo(file_name.c_str());
+ const QFileInfo file = QFileInfo(QString::fromStdString(file_name));
return GameList::supported_file_extensions.contains(file.suffix(), Qt::CaseInsensitive);
}
static bool IsExtractedNCAMain(const std::string& file_name) {
- return QFileInfo(file_name.c_str()).fileName() == "main";
+ return QFileInfo(QString::fromStdString(file_name)).fileName() == "main";
}
static QString FormatGameName(const std::string& physical_name) {
- QFileInfo file_info(physical_name.c_str());
+ const QString physical_name_as_qstring = QString::fromStdString(physical_name);
+ const QFileInfo file_info(physical_name_as_qstring);
+
if (IsExtractedNCAMain(physical_name)) {
return file_info.dir().path();
- } else {
- return QString::fromStdString(physical_name);
}
+
+ return physical_name_as_qstring;
}
void GameList::RefreshGameDirectory() {