mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
file_sys: Formatting changes and use unique_ptr in GetCacheStorageMax
This commit is contained in:
parent
4f387b0b74
commit
bc5ae04ea0
1 changed files with 6 additions and 6 deletions
|
@ -15,9 +15,9 @@
|
||||||
#include "core/hle/service/cmif_serialization.h"
|
#include "core/hle/service/cmif_serialization.h"
|
||||||
#include "core/hle/service/filesystem/filesystem.h"
|
#include "core/hle/service/filesystem/filesystem.h"
|
||||||
#include "core/hle/service/filesystem/save_data_controller.h"
|
#include "core/hle/service/filesystem/save_data_controller.h"
|
||||||
|
#include "core/hle/service/glue/glue_manager.h"
|
||||||
#include "core/hle/service/ns/ns.h"
|
#include "core/hle/service/ns/ns.h"
|
||||||
#include "core/hle/service/sm/sm.h"
|
#include "core/hle/service/sm/sm.h"
|
||||||
#include "core/hle/service/glue/glue_manager.h"
|
|
||||||
|
|
||||||
namespace Service::AM {
|
namespace Service::AM {
|
||||||
|
|
||||||
|
@ -275,11 +275,11 @@ Result IApplicationFunctions::GetCacheStorageMax(Out<u32> out_cache_storage_inde
|
||||||
std::vector<u8> nacp;
|
std::vector<u8> nacp;
|
||||||
R_TRY(system.GetARPManager().GetControlProperty(&nacp, m_applet->program_id));
|
R_TRY(system.GetARPManager().GetControlProperty(&nacp, m_applet->program_id));
|
||||||
|
|
||||||
FileSys::RawNACP raw_nacp{};
|
std::unique_ptr<FileSys::RawNACP> raw_nacp(new FileSys::RawNACP{});
|
||||||
std::memcpy(&raw_nacp, nacp.data(), std::min(sizeof(raw_nacp), nacp.size()));
|
std::memcpy(raw_nacp.get(), nacp.data(), std::min(sizeof(*raw_nacp), nacp.size()));
|
||||||
|
|
||||||
*out_cache_storage_index_max = static_cast<u32>(raw_nacp.cache_storage_max_index);
|
*out_cache_storage_index_max = static_cast<u32>(raw_nacp->cache_storage_max_index);
|
||||||
*out_max_journal_size = static_cast<u64>(raw_nacp.cache_storage_data_and_journal_max_size);
|
*out_max_journal_size = static_cast<u64>(raw_nacp->cache_storage_data_and_journal_max_size);
|
||||||
|
|
||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue