Various fixes (Trophy, Gcm corrections, stack alloc) (#2894)

* Fixed sys_get_random_number generating less bytes than needed, and ceiling the buffer size in 0x1000 instead of failing
* Corrected alignment check in libgcm
* Now calling callback of sceNpManagerRegisterCallback
* Fixed trophies
This commit is contained in:
Ofek 2017-09-02 14:43:44 +03:00 committed by Ivan
parent d3f13ab8a3
commit caab400258
7 changed files with 45 additions and 20 deletions

View file

@ -9,9 +9,9 @@ bool TROPUSRLoader::Load(const std::string& filepath, const std::string& configp
{
const std::string& path = vfs::get(filepath);
if (!fs::is_file(path))
if (!Generate(filepath, configpath))
{
Generate(filepath, configpath);
return false;
}
if (!m_file.open(path, fs::read))
@ -147,7 +147,13 @@ bool TROPUSRLoader::Generate(const std::string& filepath, const std::string& con
m_table4.clear();
m_table6.clear();
for (std::shared_ptr<rXmlNode> n = doc.GetRoot()->GetChildren(); n; n = n->GetNext())
auto trophy_base = doc.GetRoot();
if (trophy_base->GetChildren()->GetName() == "trophyconf")
{
trophy_base = trophy_base->GetChildren();
}
for (std::shared_ptr<rXmlNode> n = trophy_base->GetChildren(); n; n = n->GetNext())
{
if (n->GetName() == "trophy")
{