result: Make error description a generic integer
It is now known that result code description vary depending on the module, and so they're best defined on a per-module basis. To support this, allow passing in an arbitrary integer instead of limiting to the ones in the ErrorDescription enum. These will be gradually migrated to their individual users, but a few will be kept as "common" codes shared by all modules.
This commit is contained in:
parent
a75145a2c6
commit
3b1f0fea31
3 changed files with 18 additions and 6 deletions
|
@ -134,7 +134,7 @@ void Init() {
|
|||
auto archive_result =
|
||||
Service::FS::OpenArchive(Service::FS::ArchiveIdCode::SharedExtSaveData, archive_path);
|
||||
// If the archive didn't exist, create the files inside
|
||||
if (archive_result.Code().description == ErrorDescription::FS_NotFormatted) {
|
||||
if (archive_result.Code().description == static_cast<u32>(ErrorDescription::FS_NotFormatted)) {
|
||||
// Format the archive to create the directories
|
||||
Service::FS::FormatArchive(Service::FS::ArchiveIdCode::SharedExtSaveData,
|
||||
FileSys::ArchiveFormatInfo(), archive_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue