summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar TheKoopaKingdom2017-03-08 20:21:31 -0500
committerGravatar TheKoopaKingdom2017-06-02 18:28:14 -0400
commit37bec598ea28662462dcaab65d5abd6db8372dbc (patch)
treee1aa020f3884d601182155791d9c474df04fd133 /src/core/hle
parentAdded system for handling core errors in citra-qt. (diff)
downloadyuzu-37bec598ea28662462dcaab65d5abd6db8372dbc.tar.gz
yuzu-37bec598ea28662462dcaab65d5abd6db8372dbc.tar.xz
yuzu-37bec598ea28662462dcaab65d5abd6db8372dbc.zip
Made some changes from review comments:
- Made LoadKernelSystemMode return a pair consisting of a system mode and a result code (Could use review). - Deleted ErrorOpenGL error code in favor of just having ErrorVideoCore. - Made dialog messages more clear. - Compared archive ID in fs_user.cpp to ArchiveIdCode::NCCH as opposed to hex magic. - Cleaned up some other stuff.
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/fs/archive.cpp8
-rw-r--r--src/core/hle/service/fs/fs_user.cpp7
2 files changed, 6 insertions, 9 deletions
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp
index 632712f2c..6d1a49d92 100644
--- a/src/core/hle/service/fs/archive.cpp
+++ b/src/core/hle/service/fs/archive.cpp
@@ -257,11 +257,9 @@ ResultVal<ArchiveHandle> OpenArchive(ArchiveIdCode id_code, FileSys::Path& archi
257 LOG_TRACE(Service_FS, "Opening archive with id code 0x%08X", id_code); 257 LOG_TRACE(Service_FS, "Opening archive with id code 0x%08X", id_code);
258 258
259 auto itr = id_code_map.find(id_code); 259 auto itr = id_code_map.find(id_code);
260 if (itr == id_code_map.end()) { 260 if (itr == id_code_map.end())
261 // TODO: Verify error against hardware 261 return ResultCode(ErrorDescription::FS_NotFound, ErrorModule::FS, ErrorSummary::NotFound,
262 return ResultCode(ErrorDescription::NotFound, ErrorModule::FS, ErrorSummary::NotFound, 262 ErrorLevel::Status);
263 ErrorLevel::Permanent);
264 }
265 263
266 CASCADE_RESULT(std::unique_ptr<ArchiveBackend> res, itr->second->Open(archive_path)); 264 CASCADE_RESULT(std::unique_ptr<ArchiveBackend> res, itr->second->Open(archive_path));
267 265
diff --git a/src/core/hle/service/fs/fs_user.cpp b/src/core/hle/service/fs/fs_user.cpp
index 5a4437123..0538ffc9c 100644
--- a/src/core/hle/service/fs/fs_user.cpp
+++ b/src/core/hle/service/fs/fs_user.cpp
@@ -133,12 +133,11 @@ static void OpenFileDirectly(Service::Interface* self) {
133 LOG_ERROR(Service_FS, 133 LOG_ERROR(Service_FS,
134 "failed to get a handle for archive archive_id=0x%08X archive_path=%s", 134 "failed to get a handle for archive archive_id=0x%08X archive_path=%s",
135 static_cast<u32>(archive_id), archive_path.DebugStr().c_str()); 135 static_cast<u32>(archive_id), archive_path.DebugStr().c_str());
136 if (static_cast<u32>(archive_id) == 0x2345678A) {
137 Core::System::GetInstance().SetStatus(Core::System::ResultStatus::ErrorSystemFiles);
138 return;
139 }
140 cmd_buff[1] = archive_handle.Code().raw; 136 cmd_buff[1] = archive_handle.Code().raw;
141 cmd_buff[3] = 0; 137 cmd_buff[3] = 0;
138 if (static_cast<FS::ArchiveIdCode>(archive_id) == ArchiveIdCode::NCCH) {
139 Core::System::GetInstance().SetStatus(Core::System::ResultStatus::ErrorSystemFiles);
140 }
142 return; 141 return;
143 } 142 }
144 SCOPE_EXIT({ CloseArchive(*archive_handle); }); 143 SCOPE_EXIT({ CloseArchive(*archive_handle); });