diff --git a/rpcs3/Crypto/unpkg.cpp b/rpcs3/Crypto/unpkg.cpp index 4dcac95248..65e1d3e394 100644 --- a/rpcs3/Crypto/unpkg.cpp +++ b/rpcs3/Crypto/unpkg.cpp @@ -164,12 +164,12 @@ bool UnpackEntry(rFile& dec_pkg_f, const PKGEntry& entry, std::string dir) dec_pkg_f.Read(buf, entry.name_size); buf[entry.name_size] = 0; - switch (entry.type.data()) + switch (entry.type.data() >> 24) { - case se32(PKG_FILE_ENTRY_NPDRM): - case se32(PKG_FILE_ENTRY_NPDRMEDAT): - case se32(PKG_FILE_ENTRY_SDAT): - case se32(PKG_FILE_ENTRY_REGULAR): + case PKG_FILE_ENTRY_NPDRM: + case PKG_FILE_ENTRY_NPDRMEDAT: + case PKG_FILE_ENTRY_SDAT: + case PKG_FILE_ENTRY_REGULAR: { rFile out; 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); if (!rExists(path) && !rMkdir(path)) diff --git a/rpcs3/Emu/Memory/vm_ref.h b/rpcs3/Emu/Memory/vm_ref.h index 4d682e1ab1..1cb8353442 100644 --- a/rpcs3/Emu/Memory/vm_ref.h +++ b/rpcs3/Emu/Memory/vm_ref.h @@ -108,4 +108,38 @@ namespace vm //PS3 emulation is main now, so lets it be as default using namespace ps3; -} \ No newline at end of file +} + +namespace fmt +{ + // external specializations for fmt::format function + namespace detail + { + template + struct get_fmt, false> + { + __forceinline static std::string text(const char* fmt, size_t len, const vm::ps3::ref& arg) + { + return get_fmt::text(fmt, len, arg.addr()); + } + }; + + template + struct get_fmt, false> + { + __forceinline static std::string text(const char* fmt, size_t len, const vm::ps3::bref& arg) + { + return get_fmt::text(fmt, len, arg.addr()); + } + }; + + template + struct get_fmt, false> + { + __forceinline static std::string text(const char* fmt, size_t len, const vm::psv::ref& arg) + { + return get_fmt::text(fmt, len, arg.addr()); + } + }; + } +} diff --git a/rpcs3/Emu/SysCalls/lv2/cellFs.cpp b/rpcs3/Emu/SysCalls/lv2/cellFs.cpp index 1ee74a1cf8..a6a2c04be4 100644 --- a/rpcs3/Emu/SysCalls/lv2/cellFs.cpp +++ b/rpcs3/Emu/SysCalls/lv2/cellFs.cpp @@ -945,9 +945,9 @@ void fsAioRead(u32 fd, vm::ptr aio, int xid, vm::ptr aio, vm::ptr aio_id, vm::ptr xaio, int error, int xid, u64 size)> func) +int cellFsAioRead(vm::ptr aio, vm::ref id, vm::ptr 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) { @@ -964,7 +964,7 @@ int cellFsAioRead(vm::ptr aio, vm::ptr aio_id, vm::ptr