PKG installer fixed

This commit is contained in:
Nekotekina 2015-01-13 20:38:32 +03:00
parent 88fd748dd5
commit f1f51521f4
3 changed files with 44 additions and 10 deletions

View File

@ -164,12 +164,12 @@ bool UnpackEntry(rFile& dec_pkg_f, const PKGEntry& entry, std::string dir)
dec_pkg_f.Read(buf, entry.name_size); dec_pkg_f.Read(buf, entry.name_size);
buf[entry.name_size] = 0; buf[entry.name_size] = 0;
switch (entry.type.data()) switch (entry.type.data() >> 24)
{ {
case se32(PKG_FILE_ENTRY_NPDRM): case PKG_FILE_ENTRY_NPDRM:
case se32(PKG_FILE_ENTRY_NPDRMEDAT): case PKG_FILE_ENTRY_NPDRMEDAT:
case se32(PKG_FILE_ENTRY_SDAT): case PKG_FILE_ENTRY_SDAT:
case se32(PKG_FILE_ENTRY_REGULAR): case PKG_FILE_ENTRY_REGULAR:
{ {
rFile out; rFile out;
auto path = dir + std::string(buf, entry.name_size); auto path = dir + std::string(buf, entry.name_size);
@ -199,7 +199,7 @@ bool UnpackEntry(rFile& dec_pkg_f, const PKGEntry& entry, std::string dir)
} }
} }
case se32(PKG_FILE_ENTRY_FOLDER): case PKG_FILE_ENTRY_FOLDER:
{ {
auto path = dir + std::string(buf, entry.name_size); auto path = dir + std::string(buf, entry.name_size);
if (!rExists(path) && !rMkdir(path)) if (!rExists(path) && !rMkdir(path))

View File

@ -108,4 +108,38 @@ namespace vm
//PS3 emulation is main now, so lets it be as default //PS3 emulation is main now, so lets it be as default
using namespace ps3; using namespace ps3;
} }
namespace fmt
{
// external specializations for fmt::format function
namespace detail
{
template<typename T, typename AT>
struct get_fmt<vm::ps3::ref<T, AT>, false>
{
__forceinline static std::string text(const char* fmt, size_t len, const vm::ps3::ref<T, AT>& arg)
{
return get_fmt<AT>::text(fmt, len, arg.addr());
}
};
template<typename T, typename AT>
struct get_fmt<vm::ps3::bref<T, AT>, false>
{
__forceinline static std::string text(const char* fmt, size_t len, const vm::ps3::bref<T, AT>& arg)
{
return get_fmt<AT>::text(fmt, len, arg.addr());
}
};
template<typename T, typename AT>
struct get_fmt<vm::psv::ref<T, AT>, false>
{
__forceinline static std::string text(const char* fmt, size_t len, const vm::psv::ref<T, AT>& arg)
{
return get_fmt<AT>::text(fmt, len, arg.addr());
}
};
}
}

View File

@ -945,9 +945,9 @@ void fsAioRead(u32 fd, vm::ptr<CellFsAio> aio, int xid, vm::ptr<void(*)(vm::ptr<
g_FsAioReadCur++; g_FsAioReadCur++;
} }
int cellFsAioRead(vm::ptr<CellFsAio> aio, vm::ptr<u32> aio_id, vm::ptr<void(*)(vm::ptr<CellFsAio> xaio, int error, int xid, u64 size)> func) int cellFsAioRead(vm::ptr<CellFsAio> aio, vm::ref<u32> id, vm::ptr<void(*)(vm::ptr<CellFsAio> xaio, int error, int xid, u64 size)> func)
{ {
sys_fs->Warning("cellFsAioRead(aio_addr=0x%x, id_addr=0x%x, func_addr=0x%x)", aio, aio_id, func); sys_fs->Warning("cellFsAioRead(aio=0x%x, id=0x%x, func=0x%x)", aio, id, func);
if (!aio_init) if (!aio_init)
{ {
@ -964,7 +964,7 @@ int cellFsAioRead(vm::ptr<CellFsAio> aio, vm::ptr<u32> aio_id, vm::ptr<void(*)(v
//get a unique id for the callback (may be used by cellFsAioCancel) //get a unique id for the callback (may be used by cellFsAioCancel)
const u32 xid = g_FsAioReadID++; const u32 xid = g_FsAioReadID++;
*aio_id = xid; id = xid;
{ {
thread t("fsAioRead", std::bind(fsAioRead, fd, aio, xid, func)); thread t("fsAioRead", std::bind(fsAioRead, fd, aio, xid, func));