sceNpTrophyRegisterContext: Atomically create trophy data

This commit is contained in:
Eladash 2020-09-20 09:27:08 +03:00 committed by Ivan
parent a50ea09053
commit 3a96d99187
4 changed files with 46 additions and 6 deletions

View file

@ -628,7 +628,8 @@ namespace fs
template <typename... Args>
bool write_file(const std::string& path, bs_t<fs::open_mode> mode, const Args&... args)
{
if (fs::file f{path, mode})
// Always use write flag, remove read flag
if (fs::file f{path, mode + fs::write - fs::read})
{
// Write args sequentially
(f.write(args), ...);