main pkg files extracts to sce_sys folder

This commit is contained in:
georgemoralis 2023-03-01 18:24:33 +02:00
parent 44e60f779c
commit 907c32967e
2 changed files with 5 additions and 5 deletions

View File

@ -75,13 +75,13 @@ bool PKG::extract(const std::string& filepath, const std::string& extractPath, s
std::string name = getEntryNameByType(entry.id);
if (!name.empty())
{
QString filepath= QString::fromStdString(extractPath+name);
QString filepath= QString::fromStdString(extractPath+ "/sce_sys/" + name);
QDir dir = QFileInfo(filepath).dir();
if (!dir.exists()) {
dir.mkpath(dir.path());
}
FsFile out;
out.Open(extractPath + name, fsWrite);
out.Open(extractPath + "/sce_sys/" + name, fsWrite);
out.Write(pkg + entry.offset, entry.size);
out.Close();
}
@ -89,7 +89,7 @@ bool PKG::extract(const std::string& filepath, const std::string& extractPath, s
{
//just print with id
FsFile out;
out.Open(extractPath + std::to_string(entry.id), fsWrite);
out.Open(extractPath + "/sce_sys/" + std::to_string(entry.id), fsWrite);
out.Write(pkg + entry.offset, entry.size);
out.Close();
}

View File

@ -150,11 +150,11 @@ void GameListWorker::AddEntriesToGameList(const std::string& dir_path) {
foreach(QFileInfo item, fList)
{
PSF psf;
if (!psf.open(item.absoluteFilePath().toStdString() + "/PARAM.SFO"))
if (!psf.open(item.absoluteFilePath().toStdString() + "/sce_sys/PARAM.SFO"))
continue;//if we can't open param.sfo go to the next entry
//TODO std::string test = psf.get_string("TITLE_ID");
QString iconpath(item.absoluteFilePath() + "/ICON0.PNG");
QString iconpath(item.absoluteFilePath() + "/sce_sys/ICON0.PNG");
QString t;
emit EntryReady({