Make gamedata installation atomic as real PS3

This commit is contained in:
Eladash 2021-03-12 16:25:03 +02:00 committed by Ivan
parent a9b0d25c01
commit d7b4753007
6 changed files with 123 additions and 11 deletions

View file

@ -311,6 +311,13 @@ error_code _sys_prx_load_module_by_fd(ppu_thread& ppu, s32 fd, u64 offset, u64 f
return CELL_EBADF;
}
std::lock_guard lock(file->mp->mutex);
if (!file->file)
{
return CELL_EBADF;
}
return prx_load_module(fmt::format("%s_x%x", file->name.data(), offset), flags, pOpt, lv2_file::make_view(file, offset));
}