Apply suggestions from code review

Co-authored-by: Megamouse <studienricky89@googlemail.com>
This commit is contained in:
FlexBy420 2024-11-19 20:36:52 +01:00 committed by GitHub
commit 41d2b94566
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1098,14 +1098,13 @@ int main(int argc, char** argv)
for (const QString& path : QStandardPaths::standardLocations(QStandardPaths::StandardLocation::TempLocation)) for (const QString& path : QStandardPaths::standardLocations(QStandardPaths::StandardLocation::TempLocation))
{ {
if (Emu.IsPathInsideDir(emu_dir, path.toStdString())) if (Emu.IsPathInsideDir(emu_dir, path.toStdString()))
{ {
report_fatal_error(fmt::format( report_fatal_error(QObject::tr(
QObject::tr("RPCS3 should never be run from a temporary location!\n" "RPCS3 should never be run from a temporary location!\n"
"Please install RPCS3 in a persistent location.\n" "Please install RPCS3 in a persistent location.\n"
"Current location:\n%1").toStdString(), "Current location:\n%0").arg(QString::fromStdString(emu_dir)).toStdString());
QString::fromStdString(emu_dir).toStdString())); return 1;
return 1; }
}
} }
// Check nonsensical archive locations // Check nonsensical archive locations
@ -1114,11 +1113,13 @@ int main(int argc, char** argv)
if (emu_dir.find(expr) != umax) if (emu_dir.find(expr) != umax)
{ {
report_fatal_error(fmt::format( report_fatal_error(fmt::format(
QObject::tr("RPCS3 should never be run from an archive!\n" {
"Please install RPCS3 in a persistent location.\n" report_fatal_error(QObject::tr(
"Current location:\n%1") "RPCS3 should never be run from an archive!\n"
.toStdString(), "Please install RPCS3 in a persistent location.\n"
QString::fromStdString(emu_dir).toStdString())); "Current location:\n%0").arg(QString::fromStdString(emu_dir)).toStdString());
return 1;
}
return 1; return 1;
} }
} }