mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-25 19:44:57 +00:00
...
This commit is contained in:
parent
7a8d845234
commit
bf8ebc1c95
@ -2,12 +2,6 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "trp.h"
|
#include "trp.h"
|
||||||
#ifdef _WIN64
|
|
||||||
#include <Windows.h>
|
|
||||||
#elif
|
|
||||||
#include <limits.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
TRP::TRP() = default;
|
TRP::TRP() = default;
|
||||||
TRP::~TRP() = default;
|
TRP::~TRP() = default;
|
||||||
@ -70,24 +64,7 @@ bool TRP::Extract(std::filesystem::path trophyPath) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
s64 seekPos = sizeof(trp_header);
|
s64 seekPos = sizeof(trp_header);
|
||||||
|
std::filesystem::path trpFilesPath(std::filesystem::current_path() / "game_data" / title);
|
||||||
char buf[1024];
|
|
||||||
|
|
||||||
#ifdef _WIN64
|
|
||||||
GetModuleFileNameA(NULL, buf, 1024);
|
|
||||||
#elif
|
|
||||||
if (getcwd(buffer, sizeof(buf)) == NULL) {
|
|
||||||
// std::cerr << "Error getting current directory!" << std::endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
std::string appPath(buf);
|
|
||||||
std::size_t found = appPath.find_last_of("/\\");
|
|
||||||
if (found != std::string::npos) {
|
|
||||||
appPath = appPath.substr(0, found);
|
|
||||||
}
|
|
||||||
trpFilesPath = std::filesystem::path(appPath + "/game_data/" + title);
|
|
||||||
|
|
||||||
std::filesystem::path multiPath(trpFilesPath / "TrophyFiles");
|
std::filesystem::path multiPath(trpFilesPath / "TrophyFiles");
|
||||||
if (fileList.size() > 1) {
|
if (fileList.size() > 1) {
|
||||||
multiPath = trpFilesPath / "TrophyFiles" / multiTrp;
|
multiPath = trpFilesPath / "TrophyFiles" / multiTrp;
|
||||||
|
Loading…
Reference in New Issue
Block a user