This commit is contained in:
Nekotekina 2014-03-26 16:00:58 +04:00
commit 79c01316d6
8 changed files with 29 additions and 31 deletions

View File

@ -15,7 +15,7 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../bin")
add_definitions(-DGL_GLEXT_PROTOTYPES)
add_definitions(-DGLX_GLXEXT_PROTOTYPES)
find_package(wxWidgets COMPONENTS core base net aui gl REQUIRED)
find_package(wxWidgets COMPONENTS core base net aui gl xml REQUIRED)
find_package(GLEW REQUIRED)
find_package(OpenGL REQUIRED)
find_package(ZLIB REQUIRED)

View File

@ -8,11 +8,11 @@
// Error Codes
enum
{
CELL_DMUX_ERROR_ARG = 0x80610201,
CELL_DMUX_ERROR_SEQ = 0x80610202,
CELL_DMUX_ERROR_BUSY = 0x80610203,
CELL_DMUX_ERROR_EMPTY = 0x80610204,
CELL_DMUX_ERROR_FATAL = 0x80610205,
CELL_DMUX_ERROR_ARG = 0x80610201,
CELL_DMUX_ERROR_SEQ = 0x80610202,
CELL_DMUX_ERROR_BUSY = 0x80610203,
CELL_DMUX_ERROR_EMPTY = 0x80610204,
CELL_DMUX_ERROR_FATAL = 0x80610205,
};
enum CellDmuxStreamType
@ -605,14 +605,9 @@ public:
//(u32)info->auSize, put, (u32)info->ptsLower);
u32 new_addr = a128(put + 128 + size);
if ((new_addr + GetMaxAU()) > (memAddr + memSize))
{
put = memAddr;
}
else
{
put = new_addr;
}
put = ((new_addr + GetMaxAU()) > (memAddr + memSize))
? memAddr : new_addr;
size = 0;
put_count++;
@ -750,7 +745,7 @@ public:
if (update_index)
{
/*u32 new_addr = a128(peek + 128 + info->auSize);
if (new_addr = put)
if (new_addr == put)
{
peek = 0;
}

View File

@ -864,9 +864,9 @@ int cellHddGameCheck(u32 version, u32 dirName_addr, u32 errDialog, mem_func_ptr_
get->hddFreeSizeKB = 40000000; // 40 GB, TODO: Use the free space of the computer's HDD where RPCS3 is being run.
get->isNewData = CELL_HDDGAME_ISNEWDATA_EXIST;
get->sysSizeKB = 0; // TODO
get->st_atime = 0; // TODO
get->st_ctime = 0; // TODO
get->st_mtime = 0; // TODO
get->st_atime__ = 0; // TODO
get->st_ctime__ = 0; // TODO
get->st_mtime__ = 0; // TODO
get->sizeKB = CELL_HDDGAME_SIZEKB_NOTCALC;
memcpy(get->contentInfoPath, ("/dev_hdd0/game/"+dirName).c_str(), CELL_HDDGAME_PATH_MAX);
memcpy(get->hddGamePath, ("/dev_hdd0/game/"+dirName+"/USRDIR").c_str(), CELL_HDDGAME_PATH_MAX);

View File

@ -204,9 +204,9 @@ struct CellHddGameStatGet
u8 contentInfoPath[CELL_HDDGAME_PATH_MAX];
u8 hddGamePath[CELL_HDDGAME_PATH_MAX];
u8 reserved0[2];
be_t<u64> st_atime;
be_t<u64> st_mtime;
be_t<u64> st_ctime;
be_t<u64> st_atime__;
be_t<u64> st_mtime__;
be_t<u64> st_ctime__;
CellHddGameSystemFileParam getParam;
be_t<s32> sizeKB;
be_t<s32> sysSizeKB;

View File

@ -159,7 +159,9 @@ int sceNpTrophyRegisterContext(u32 context, u32 handle, u32 statusCb_addr, u32 a
return SCE_NP_TROPHY_ERROR_ILLEGAL_UPDATE;
TROPUSRLoader* tropusr = new TROPUSRLoader();
tropusr->Load(trophyPath + "/TROPUSR.DAT", trophyPath + "/TROPCONF.SFM");
std::string trophyUsrPath = trophyPath + "/TROPUSR.DAT";
std::string trophyConfPath = trophyPath + "/TROPCONF.SFM";
tropusr->Load(trophyUsrPath, trophyConfPath);
ctxt.tropusr = tropusr;
// TODO: Callbacks
@ -292,7 +294,8 @@ int sceNpTrophyUnlockTrophy(u32 context, u32 handle, s32 trophyId, mem32_t plati
u64 timestamp1 = get_system_time(); // TODO: Either timestamp1 or timestamp2 is wrong
u64 timestamp2 = get_system_time(); // TODO: Either timestamp1 or timestamp2 is wrong
ctxt.tropusr->UnlockTrophy(trophyId, timestamp1, timestamp2);
ctxt.tropusr->Save("/dev_hdd0/home/00000001/trophy/" + ctxt.trp_name + "/TROPUSR.DAT");
std::string trophyPath = "/dev_hdd0/home/00000001/trophy/" + ctxt.trp_name + "/TROPUSR.DAT";
ctxt.tropusr->Save(trophyPath);
platinumId = SCE_NP_TROPHY_INVALID_TROPHY_ID; // TODO
return CELL_OK;
@ -419,4 +422,4 @@ void sceNpTrophy_init()
sceNpTrophy.AddFunc(0xe3bf9a28, sceNpTrophyCreateContext);
sceNpTrophy.AddFunc(0xfce6d30a, sceNpTrophyGetTrophyInfo);
sceNpTrophy.AddFunc(0xff299e03, sceNpTrophyGetGameIcon);
}
}

View File

@ -175,7 +175,7 @@ bool SleepQueue::invalidate(u32 tid)
if (tid) for (u32 i = 0; i < list.GetCount(); i++)
{
if (list[i] = tid)
if (list[i] == tid)
{
list.RemoveAt(i);
return true;

View File

@ -14,7 +14,7 @@ TROPUSRLoader::~TROPUSRLoader()
Close();
}
bool TROPUSRLoader::Load(std::string& filepath, std::string& configpath)
bool TROPUSRLoader::Load(const std::string& filepath, const std::string& configpath)
{
if (m_file)
Close();
@ -94,7 +94,7 @@ bool TROPUSRLoader::LoadTables()
}
// TODO: TROPUSRLoader::Save deletes the TROPUSR and creates it again. This is probably very slow.
bool TROPUSRLoader::Save(std::string& filepath)
bool TROPUSRLoader::Save(const std::string& filepath)
{
if (m_file)
Close();
@ -117,7 +117,7 @@ bool TROPUSRLoader::Save(std::string& filepath)
return true;
}
bool TROPUSRLoader::Generate(std::string& filepath, std::string& configpath)
bool TROPUSRLoader::Generate(const std::string& filepath, const std::string& configpath)
{
wxString path;
wxXmlDocument doc;

View File

@ -61,7 +61,7 @@ class TROPUSRLoader
std::vector<TROPUSREntry4> m_table4;
std::vector<TROPUSREntry6> m_table6;
virtual bool Generate(std::string& filepath, std::string& configpath);
virtual bool Generate(const std::string& filepath, const std::string& configpath);
virtual bool LoadHeader();
virtual bool LoadTableHeaders();
virtual bool LoadTables();
@ -70,8 +70,8 @@ public:
TROPUSRLoader();
~TROPUSRLoader();
virtual bool Load(std::string& filepath, std::string& configpath);
virtual bool Save(std::string& filepath);
virtual bool Load(const std::string& filepath, const std::string& configpath);
virtual bool Save(const std::string& filepath);
virtual bool Close();
virtual u32 GetTrophiesCount();