From 3e9cbb4a247ec49b230e710076a93ca981e0ac4a Mon Sep 17 00:00:00 2001 From: Sacha Date: Sat, 22 Mar 2014 00:07:05 +1000 Subject: [PATCH] Linux build fix. --- rpcs3/CMakeLists.txt | 2 +- rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp | 6 +++--- rpcs3/Emu/SysCalls/Modules/cellSysutil.h | 6 +++--- rpcs3/Emu/SysCalls/Modules/sceNpTrophy.cpp | 9 ++++++--- rpcs3/Loader/TROPUSR.cpp | 6 +++--- rpcs3/Loader/TROPUSR.h | 6 +++--- 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index b0e9b5eb5d..f696f842f8 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -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) diff --git a/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp b/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp index 7ce3935dd4..f578345de2 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp @@ -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); diff --git a/rpcs3/Emu/SysCalls/Modules/cellSysutil.h b/rpcs3/Emu/SysCalls/Modules/cellSysutil.h index eb53f7ea34..b606438b50 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSysutil.h +++ b/rpcs3/Emu/SysCalls/Modules/cellSysutil.h @@ -204,9 +204,9 @@ struct CellHddGameStatGet u8 contentInfoPath[CELL_HDDGAME_PATH_MAX]; u8 hddGamePath[CELL_HDDGAME_PATH_MAX]; u8 reserved0[2]; - be_t st_atime; - be_t st_mtime; - be_t st_ctime; + be_t st_atime__; + be_t st_mtime__; + be_t st_ctime__; CellHddGameSystemFileParam getParam; be_t sizeKB; be_t sysSizeKB; diff --git a/rpcs3/Emu/SysCalls/Modules/sceNpTrophy.cpp b/rpcs3/Emu/SysCalls/Modules/sceNpTrophy.cpp index 0a5613a8f9..1e137e562e 100644 --- a/rpcs3/Emu/SysCalls/Modules/sceNpTrophy.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sceNpTrophy.cpp @@ -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); -} \ No newline at end of file +} diff --git a/rpcs3/Loader/TROPUSR.cpp b/rpcs3/Loader/TROPUSR.cpp index e9ed6bd30b..fc5a8fd0d3 100644 --- a/rpcs3/Loader/TROPUSR.cpp +++ b/rpcs3/Loader/TROPUSR.cpp @@ -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; diff --git a/rpcs3/Loader/TROPUSR.h b/rpcs3/Loader/TROPUSR.h index a01fd75230..7fca0aa590 100644 --- a/rpcs3/Loader/TROPUSR.h +++ b/rpcs3/Loader/TROPUSR.h @@ -61,7 +61,7 @@ class TROPUSRLoader std::vector m_table4; std::vector 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();