Merge branch 'misc-fixes3' of https://github.com/shadps4-emu/shadPS4 into misc-fixes3

This commit is contained in:
IndecisiveTurtle 2024-07-15 15:05:29 +03:00
commit 10a7110c7d
8 changed files with 19 additions and 17 deletions

View file

@ -20,7 +20,7 @@ public:
EventFlagInternal(const std::string& name, ThreadMode thread_mode, QueueMode queue_mode,
uint64_t bits)
: m_name(name), m_thread_mode(thread_mode), m_queue_mode(queue_mode), m_bits(bits) {};
: m_name(name), m_thread_mode(thread_mode), m_queue_mode(queue_mode), m_bits(bits){};
int Wait(u64 bits, WaitMode wait_mode, ClearMode clear_mode, u64* result, u32* ptr_micros);
int Poll(u64 bits, WaitMode wait_mode, ClearMode clear_mode, u64* result);

View file

@ -58,7 +58,7 @@ int PS4_SYSV_ABI sceKernelOpen(const char* path, int flags, u16 mode) {
if (directory) {
file->is_directory = true;
file->m_guest_name = path;
file->m_host_name = mnt->GetHostPath(file->m_guest_name);
file->m_host_name = mnt->GetHostPath(file->m_guest_name).string();
if (!std::filesystem::is_directory(file->m_host_name)) { // directory doesn't exist
h->DeleteHandle(handle);
return ORBIS_KERNEL_ERROR_ENOTDIR;
@ -72,7 +72,7 @@ int PS4_SYSV_ABI sceKernelOpen(const char* path, int flags, u16 mode) {
}
} else {
file->m_guest_name = path;
file->m_host_name = mnt->GetHostPath(file->m_guest_name);
file->m_host_name = mnt->GetHostPath(file->m_guest_name).string();
int e = 0;
if (read) {
e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::Read);
@ -174,7 +174,7 @@ int PS4_SYSV_ABI sceKernelUnlink(const char* path) {
return SCE_KERNEL_ERROR_EPERM;
}
auto* file = h->getFile(host_path);
auto* file = h->getFile(host_path.string());
if (file != nullptr) {
file->f.Unlink();
}