mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-11 10:47:58 -05:00
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:
@ -411,7 +411,8 @@ ResultCode UpdateConfigNANDSavegame() {
|
||||
ResultCode FormatConfig() {
|
||||
ResultCode res = DeleteConfigNANDSaveFile();
|
||||
// The delete command fails if the file doesn't exist, so we have to check that too
|
||||
if (!res.IsSuccess() && res.description != ErrorDescription::FS_FileNotFound) {
|
||||
if (!res.IsSuccess() &&
|
||||
res.description != static_cast<u32>(ErrorDescription::FS_FileNotFound)) {
|
||||
return res;
|
||||
}
|
||||
// Delete the old data
|
||||
@ -534,7 +535,7 @@ ResultCode LoadConfigNANDSaveFile() {
|
||||
Service::FS::OpenArchive(Service::FS::ArchiveIdCode::SystemSaveData, 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::SystemSaveData,
|
||||
FileSys::ArchiveFormatInfo(), archive_path);
|
||||
|
Reference in New Issue
Block a user