mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-26 15:30:06 +00:00
fixup: clang-format and code cleanups
This commit is contained in:
parent
ba479ac20e
commit
c9541cc906
@ -207,10 +207,10 @@ void System::Shutdown() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static System::Integrity::Status GetArchiveStatus(const std::string& name, const u32 id_high,
|
static System::Integrity::Status GetArchiveStatus(const std::string& name, const u32 id_high,
|
||||||
const u32 id_low, std::string& settings_version,
|
const u32 id_low, std::string& settings_version,
|
||||||
const void* custom_data,
|
const void* custom_data,
|
||||||
const size_t custom_data_length,
|
const size_t custom_data_length,
|
||||||
const std::string& legacy_path = "") {
|
const std::string& legacy_path = "") {
|
||||||
std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX);
|
std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX);
|
||||||
std::string shared_font_path =
|
std::string shared_font_path =
|
||||||
Common::StringFromFormat("%s%s/title/%08x/%08x/content/00000000.app.romfs",
|
Common::StringFromFormat("%s%s/title/%08x/%08x/content/00000000.app.romfs",
|
||||||
@ -222,40 +222,36 @@ static System::Integrity::Status GetArchiveStatus(const std::string& name, const
|
|||||||
LOG_INFO(Core, "SystemCheck: %s exists.", name.c_str());
|
LOG_INFO(Core, "SystemCheck: %s exists.", name.c_str());
|
||||||
return System::Integrity::Dumped;
|
return System::Integrity::Dumped;
|
||||||
#ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES
|
#ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES
|
||||||
} else if (settings_version == CUSTOM_ARCHIVES_VERSION) {
|
} else if (settings_version != CUSTOM_ARCHIVES_VERSION && custom_data_length) {
|
||||||
LOG_WARNING(Core, "SystemCheck: %s(custom) exists.", name.c_str());
|
|
||||||
return System::Integrity::Custom;
|
|
||||||
} else {
|
|
||||||
FileUtil::IOFile file(shared_font_path, "wb");
|
FileUtil::IOFile file(shared_font_path, "wb");
|
||||||
file.WriteBytes(custom_data, custom_data_length);
|
file.WriteBytes(custom_data, custom_data_length);
|
||||||
file.Close();
|
file.Close();
|
||||||
settings_version = CUSTOM_ARCHIVES_VERSION;
|
settings_version = CUSTOM_ARCHIVES_VERSION;
|
||||||
LOG_WARNING(Core, "SystemCheck: Updated %s.", name.c_str());
|
LOG_WARNING(Core, "SystemCheck: Updated %s.", name.c_str());
|
||||||
return System::Integrity::CreatedCustom;
|
return System::Integrity::CreatedCustom;
|
||||||
#else
|
|
||||||
} else {
|
|
||||||
LOG_WARNING(Core, "SystemCheck: %s(custom) exists.", name.c_str());
|
|
||||||
return System::Integrity::Custom;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!legacy_path.empty() && FileUtil::Exists(legacy_path)) {
|
|
||||||
LOG_INFO(Core, "SystemCheck: %s(legacy) exists.", name.c_str());
|
|
||||||
return System::Integrity::DumpedLegacy;
|
|
||||||
} else {
|
|
||||||
LOG_ERROR(Core, "SystemCheck: %s missing.", name.c_str());
|
|
||||||
#ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES
|
|
||||||
FileUtil::IOFile file(shared_font_path, "wb");
|
|
||||||
file.WriteBytes(custom_data, custom_data_length);
|
|
||||||
file.Close();
|
|
||||||
settings_version = CUSTOM_ARCHIVES_VERSION;
|
|
||||||
LOG_WARNING(Core, "SystemCheck: Created %s.", name.c_str());
|
|
||||||
return System::Integrity::CreatedCustom;
|
|
||||||
#else
|
|
||||||
return System::Integrity::Missing;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
LOG_WARNING(Core, "SystemCheck: %s(custom) exists.", name.c_str());
|
||||||
|
return System::Integrity::Custom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!legacy_path.empty() && FileUtil::Exists(legacy_path)) {
|
||||||
|
LOG_INFO(Core, "SystemCheck: %s(legacy) exists.", name.c_str());
|
||||||
|
return System::Integrity::DumpedLegacy;
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG_ERROR(Core, "SystemCheck: %s missing.", name.c_str());
|
||||||
|
#ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES
|
||||||
|
if (custom_data_length) {
|
||||||
|
FileUtil::IOFile file(shared_font_path, "wb");
|
||||||
|
file.WriteBytes(custom_data, custom_data_length);
|
||||||
|
file.Close();
|
||||||
|
settings_version = CUSTOM_ARCHIVES_VERSION;
|
||||||
|
LOG_WARNING(Core, "SystemCheck: Created %s.", name.c_str());
|
||||||
|
return System::Integrity::CreatedCustom;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return System::Integrity::Missing;
|
||||||
}
|
}
|
||||||
|
|
||||||
void System::SystemIntegrityCheck() {
|
void System::SystemIntegrityCheck() {
|
||||||
|
Loading…
Reference in New Issue
Block a user