mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 04:02:42 +01:00
Merge pull request #2390 from georgemoralis/master
Implemented cellDiscGameGetBootDiscInfo
This commit is contained in:
commit
b637bd3866
@ -757,9 +757,21 @@ s32 cellGameThemeInstallFromBuffer()
|
||||
}
|
||||
|
||||
|
||||
s32 cellDiscGameGetBootDiscInfo()
|
||||
s32 cellDiscGameGetBootDiscInfo(vm::ptr<CellDiscGameSystemFileParam> getParam)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellGame);
|
||||
cellGame.warning("cellDiscGameGetBootDiscInfo(getParam=*0x%x)", getParam);
|
||||
//this should only appear in disc games
|
||||
const std::string dir = "/dev_bdvd/PS3_GAME"s;
|
||||
|
||||
if (!fs::is_dir(vfs::get(dir)))
|
||||
{
|
||||
cellGame.warning("cellDiscGameGetBootDiscInfo(): directory '%s' not found", dir);
|
||||
}
|
||||
const auto& psf = psf::load_object(fs::file(vfs::get(dir + "/PARAM.SFO")));
|
||||
|
||||
if (psf.count("PARENTAL_LEVEL") != 0) getParam->parentalLevel = psf.at("PARENTAL_LEVEL").as_integer();
|
||||
if (psf.count("TITLE_ID") != 0) strcpy_trunc(getParam->titleId, psf.at("TITLE_ID").as_string());
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -178,6 +178,8 @@ enum // old consts
|
||||
|
||||
CELL_GAMEDATA_ERRDIALOG_NONE = 0,
|
||||
CELL_GAMEDATA_ERRDIALOG_ALWAYS = 1,
|
||||
|
||||
CELL_DISCGAME_SYSP_TITLEID_SIZE=10,
|
||||
};
|
||||
|
||||
struct CellGameDataSystemFileParam
|
||||
@ -192,6 +194,12 @@ struct CellGameDataSystemFileParam
|
||||
be_t<u32> attribute;
|
||||
char reserved2[256];
|
||||
};
|
||||
struct CellDiscGameSystemFileParam {
|
||||
char titleId[CELL_DISCGAME_SYSP_TITLEID_SIZE];
|
||||
char reserved0[2];
|
||||
be_t<u32> parentalLevel;
|
||||
char reserved1[16];
|
||||
};
|
||||
|
||||
struct CellGameDataStatGet
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user