diff options
| author | 2022-06-25 22:44:19 -0500 | |
|---|---|---|
| committer | 2022-06-26 20:21:37 -0500 | |
| commit | a7d9be13840acd65d0d684666390758ede72c826 (patch) | |
| tree | 37485f63b09576444173d6a765abe0bb95dd45db /src/core/hle/service/fatal | |
| parent | Merge pull request #8475 from liamwhite/x18 (diff) | |
| download | yuzu-a7d9be13840acd65d0d684666390758ede72c826.tar.gz yuzu-a7d9be13840acd65d0d684666390758ede72c826.tar.xz yuzu-a7d9be13840acd65d0d684666390758ede72c826.zip | |
core: Replace all instances of ResultCode with Result
Diffstat (limited to 'src/core/hle/service/fatal')
| -rw-r--r-- | src/core/hle/service/fatal/fatal.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/hle/service/fatal/fatal.cpp b/src/core/hle/service/fatal/fatal.cpp index a99c90479..27675615b 100644 --- a/src/core/hle/service/fatal/fatal.cpp +++ b/src/core/hle/service/fatal/fatal.cpp | |||
| @@ -62,8 +62,7 @@ enum class FatalType : u32 { | |||
| 62 | ErrorScreen = 2, | 62 | ErrorScreen = 2, |
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | static void GenerateErrorReport(Core::System& system, ResultCode error_code, | 65 | static void GenerateErrorReport(Core::System& system, Result error_code, const FatalInfo& info) { |
| 66 | const FatalInfo& info) { | ||
| 67 | const auto title_id = system.GetCurrentProcessProgramID(); | 66 | const auto title_id = system.GetCurrentProcessProgramID(); |
| 68 | std::string crash_report = fmt::format( | 67 | std::string crash_report = fmt::format( |
| 69 | "Yuzu {}-{} crash report\n" | 68 | "Yuzu {}-{} crash report\n" |
| @@ -106,7 +105,7 @@ static void GenerateErrorReport(Core::System& system, ResultCode error_code, | |||
| 106 | info.backtrace_size, info.ArchAsString(), info.unk10); | 105 | info.backtrace_size, info.ArchAsString(), info.unk10); |
| 107 | } | 106 | } |
| 108 | 107 | ||
| 109 | static void ThrowFatalError(Core::System& system, ResultCode error_code, FatalType fatal_type, | 108 | static void ThrowFatalError(Core::System& system, Result error_code, FatalType fatal_type, |
| 110 | const FatalInfo& info) { | 109 | const FatalInfo& info) { |
| 111 | LOG_ERROR(Service_Fatal, "Threw fatal error type {} with error code 0x{:X}", fatal_type, | 110 | LOG_ERROR(Service_Fatal, "Threw fatal error type {} with error code 0x{:X}", fatal_type, |
| 112 | error_code.raw); | 111 | error_code.raw); |
| @@ -129,7 +128,7 @@ static void ThrowFatalError(Core::System& system, ResultCode error_code, FatalTy | |||
| 129 | void Module::Interface::ThrowFatal(Kernel::HLERequestContext& ctx) { | 128 | void Module::Interface::ThrowFatal(Kernel::HLERequestContext& ctx) { |
| 130 | LOG_ERROR(Service_Fatal, "called"); | 129 | LOG_ERROR(Service_Fatal, "called"); |
| 131 | IPC::RequestParser rp{ctx}; | 130 | IPC::RequestParser rp{ctx}; |
| 132 | const auto error_code = rp.Pop<ResultCode>(); | 131 | const auto error_code = rp.Pop<Result>(); |
| 133 | 132 | ||
| 134 | ThrowFatalError(system, error_code, FatalType::ErrorScreen, {}); | 133 | ThrowFatalError(system, error_code, FatalType::ErrorScreen, {}); |
| 135 | IPC::ResponseBuilder rb{ctx, 2}; | 134 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -139,7 +138,7 @@ void Module::Interface::ThrowFatal(Kernel::HLERequestContext& ctx) { | |||
| 139 | void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) { | 138 | void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) { |
| 140 | LOG_ERROR(Service_Fatal, "called"); | 139 | LOG_ERROR(Service_Fatal, "called"); |
| 141 | IPC::RequestParser rp(ctx); | 140 | IPC::RequestParser rp(ctx); |
| 142 | const auto error_code = rp.Pop<ResultCode>(); | 141 | const auto error_code = rp.Pop<Result>(); |
| 143 | const auto fatal_type = rp.PopEnum<FatalType>(); | 142 | const auto fatal_type = rp.PopEnum<FatalType>(); |
| 144 | 143 | ||
| 145 | ThrowFatalError(system, error_code, fatal_type, | 144 | ThrowFatalError(system, error_code, fatal_type, |
| @@ -151,7 +150,7 @@ void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) { | |||
| 151 | void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx) { | 150 | void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx) { |
| 152 | LOG_ERROR(Service_Fatal, "called"); | 151 | LOG_ERROR(Service_Fatal, "called"); |
| 153 | IPC::RequestParser rp(ctx); | 152 | IPC::RequestParser rp(ctx); |
| 154 | const auto error_code = rp.Pop<ResultCode>(); | 153 | const auto error_code = rp.Pop<Result>(); |
| 155 | const auto fatal_type = rp.PopEnum<FatalType>(); | 154 | const auto fatal_type = rp.PopEnum<FatalType>(); |
| 156 | const auto fatal_info = ctx.ReadBuffer(); | 155 | const auto fatal_info = ctx.ReadBuffer(); |
| 157 | FatalInfo info{}; | 156 | FatalInfo info{}; |