mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-22 04:24:44 +00:00
Fix path bugs
This commit is contained in:
parent
d9f287eaa2
commit
52b78ea248
5 changed files with 6 additions and 24 deletions
|
@ -312,10 +312,7 @@ public:
|
|||
|
||||
if (selected == &installPackage) {
|
||||
QStringList pkg_app_ = m_pkg_app_list[itemIndex].split(";;");
|
||||
std::filesystem::path path(pkg_app_[9].toStdString());
|
||||
#ifdef _WIN32
|
||||
path = std::filesystem::path(pkg_app_[9].toStdWString());
|
||||
#endif
|
||||
std::filesystem::path path = Common::FS::PathFromQString(pkg_app_[9]);
|
||||
InstallDragDropPkg(path, 1, 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -625,10 +625,7 @@ void MainWindow::InstallPkg() {
|
|||
int pkgNum = 0;
|
||||
for (const QString& file : fileNames) {
|
||||
++pkgNum;
|
||||
std::filesystem::path path(file.toStdString());
|
||||
#ifdef _WIN64
|
||||
path = std::filesystem::path(file.toStdWString());
|
||||
#endif
|
||||
std::filesystem::path path = Common::FS::PathFromQString(file);
|
||||
MainWindow::InstallDragDropPkg(path, pkgNum, nPkg);
|
||||
}
|
||||
}
|
||||
|
@ -646,10 +643,7 @@ void MainWindow::BootGame() {
|
|||
QMessageBox::critical(nullptr, tr("Game Boot"),
|
||||
QString(tr("Only one file can be selected!")));
|
||||
} else {
|
||||
std::filesystem::path path(fileNames[0].toStdString());
|
||||
#ifdef _WIN64
|
||||
path = std::filesystem::path(fileNames[0].toStdWString());
|
||||
#endif
|
||||
std::filesystem::path path = Common::FS::PathFromQString(fileNames[0]);
|
||||
Core::Emulator emulator;
|
||||
if (!std::filesystem::exists(path)) {
|
||||
QMessageBox::critical(nullptr, tr("Run Game"),
|
||||
|
|
|
@ -110,10 +110,7 @@ protected:
|
|||
int nPkg = urlList.size();
|
||||
for (const QUrl& url : urlList) {
|
||||
pkgNum++;
|
||||
std::filesystem::path path(url.toLocalFile().toStdString());
|
||||
#ifdef _WIN64
|
||||
path = std::filesystem::path(url.toLocalFile().toStdWString());
|
||||
#endif
|
||||
std::filesystem::path path = Common::FS::PathFromQString(url.toLocalFile());
|
||||
InstallDragDropPkg(path, pkgNum, nPkg);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,10 +104,7 @@ void PKGViewer::ProcessPKGInfo() {
|
|||
m_pkg_patch_list.clear();
|
||||
m_full_pkg_list.clear();
|
||||
for (int i = 0; i < m_pkg_list.size(); i++) {
|
||||
std::filesystem::path path(m_pkg_list[i].toStdString());
|
||||
#ifdef _WIN32
|
||||
path = std::filesystem::path(m_pkg_list[i].toStdWString());
|
||||
#endif
|
||||
std::filesystem::path path = Common::FS::PathFromQString(m_pkg_list[i]);
|
||||
package.Open(path);
|
||||
psf.Open(package.sfo);
|
||||
QString title_name =
|
||||
|
|
|
@ -28,10 +28,7 @@ void TrophyViewer::PopulateTrophyWidget(QString title) {
|
|||
|
||||
QDir dir(trophyDirQt);
|
||||
if (!dir.exists()) {
|
||||
std::filesystem::path path(gameTrpPath_.toStdString());
|
||||
#ifdef _WIN64
|
||||
path = std::filesystem::path(gameTrpPath_.toStdWString());
|
||||
#endif
|
||||
std::filesystem::path path = Common::FS::PathFromQString(gameTrpPath_);
|
||||
if (!trp.Extract(path))
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue