mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 00:13:08 +00:00
various fixes
This commit is contained in:
parent
66a411263e
commit
447d687fbc
@ -296,6 +296,7 @@ int PS4_SYSV_ABI sceNpTrophyGetGameInfo(OrbisNpTrophyContext context, OrbisNpTro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
details->numGroups = numGroups;
|
||||||
details->numTrophies = numTrophies;
|
details->numTrophies = numTrophies;
|
||||||
details->numPlatinum = numTrophiesByRarity[ORBIS_NP_TROPHY_GRADE_PLATINUM];
|
details->numPlatinum = numTrophiesByRarity[ORBIS_NP_TROPHY_GRADE_PLATINUM];
|
||||||
details->numGold = numTrophiesByRarity[ORBIS_NP_TROPHY_GRADE_GOLD];
|
details->numGold = numTrophiesByRarity[ORBIS_NP_TROPHY_GRADE_GOLD];
|
||||||
@ -370,9 +371,11 @@ int PS4_SYSV_ABI sceNpTrophyGetGroupInfo(OrbisNpTrophyContext context, OrbisNpTr
|
|||||||
if (std::string(it->name()) == "group") {
|
if (std::string(it->name()) == "group") {
|
||||||
numGroups++;
|
numGroups++;
|
||||||
std::string currentGroupId = it->attribute("id").value();
|
std::string currentGroupId = it->attribute("id").value();
|
||||||
|
if (!currentGroupId.empty()) {
|
||||||
if (std::stoi(currentGroupId) == groupId) {
|
if (std::stoi(currentGroupId) == groupId) {
|
||||||
std::string currentGroupName = it->child("name").text().as_string();
|
std::string currentGroupName = it->child("name").text().as_string();
|
||||||
std::string currentGroupDescription = it->child("detail").text().as_string();
|
std::string currentGroupDescription =
|
||||||
|
it->child("detail").text().as_string();
|
||||||
|
|
||||||
strncpy(details->title, currentGroupName.c_str(),
|
strncpy(details->title, currentGroupName.c_str(),
|
||||||
ORBIS_NP_TROPHY_GROUP_TITLE_MAX_SIZE);
|
ORBIS_NP_TROPHY_GROUP_TITLE_MAX_SIZE);
|
||||||
@ -380,6 +383,7 @@ int PS4_SYSV_ABI sceNpTrophyGetGroupInfo(OrbisNpTrophyContext context, OrbisNpTr
|
|||||||
ORBIS_NP_TROPHY_GAME_DESCR_MAX_SIZE);
|
ORBIS_NP_TROPHY_GAME_DESCR_MAX_SIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
data->groupId = groupId;
|
data->groupId = groupId;
|
||||||
|
|
||||||
@ -388,6 +392,7 @@ int PS4_SYSV_ABI sceNpTrophyGetGroupInfo(OrbisNpTrophyContext context, OrbisNpTr
|
|||||||
std::string currentTrophyGrade = it->attribute("ttype").value();
|
std::string currentTrophyGrade = it->attribute("ttype").value();
|
||||||
std::string currentTrophyGroupID = it->attribute("gid").value();
|
std::string currentTrophyGroupID = it->attribute("gid").value();
|
||||||
|
|
||||||
|
if (!currentTrophyGroupID.empty()) {
|
||||||
if (std::stoi(currentTrophyGroupID) == groupId) {
|
if (std::stoi(currentTrophyGroupID) == groupId) {
|
||||||
numTrophies++;
|
numTrophies++;
|
||||||
if (!currentTrophyGrade.empty()) {
|
if (!currentTrophyGrade.empty()) {
|
||||||
@ -401,6 +406,7 @@ int PS4_SYSV_ABI sceNpTrophyGetGroupInfo(OrbisNpTrophyContext context, OrbisNpTr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
details->numTrophies = numTrophies;
|
details->numTrophies = numTrophies;
|
||||||
details->numPlatinum = numTrophiesByRarity[ORBIS_NP_TROPHY_GRADE_PLATINUM];
|
details->numPlatinum = numTrophiesByRarity[ORBIS_NP_TROPHY_GRADE_PLATINUM];
|
||||||
@ -988,7 +994,8 @@ int PS4_SYSV_ABI sceNpTrophyUnlockTrophy(OrbisNpTrophyContext context, OrbisNpTr
|
|||||||
it->append_attribute("timestamp") =
|
it->append_attribute("timestamp") =
|
||||||
std::to_string(trophyTimestamp.tick).c_str();
|
std::to_string(trophyTimestamp.tick).c_str();
|
||||||
} else {
|
} else {
|
||||||
it->attribute("timestamp").set_value(std::to_string(trophyTimestamp.tick).c_str());
|
it->attribute("timestamp")
|
||||||
|
.set_value(std::to_string(trophyTimestamp.tick).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
g_trophy_ui.AddTrophyToQueue(trophyId, currentTrophyName);
|
g_trophy_ui.AddTrophyToQueue(trophyId, currentTrophyName);
|
||||||
|
Loading…
Reference in New Issue
Block a user