Fatal fixups
This commit is contained in:
@@ -44,7 +44,7 @@ struct FatalInfo {
|
|||||||
};
|
};
|
||||||
static_assert(sizeof(FatalInfo) == 0x250, "FatalInfo is an invalid size");
|
static_assert(sizeof(FatalInfo) == 0x250, "FatalInfo is an invalid size");
|
||||||
|
|
||||||
enum class FatalType : u32_le {
|
enum class FatalType : u32 {
|
||||||
ErrorReportAndScreen = 0,
|
ErrorReportAndScreen = 0,
|
||||||
ErrorReport = 1,
|
ErrorReport = 1,
|
||||||
ErrorScreen = 2,
|
ErrorScreen = 2,
|
||||||
@@ -110,7 +110,7 @@ static void GenerateErrorReport(ResultCode error_code, const FatalInfo& info) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThrowFatalError(ResultCode error_code, FatalType fatal_type, const FatalInfo& info) {
|
static void ThrowFatalError(ResultCode error_code, FatalType fatal_type, const FatalInfo& info) {
|
||||||
LOG_ERROR(Service_Fatal, "Threw fatal error type {}", static_cast<u32>(fatal_type));
|
LOG_ERROR(Service_Fatal, "Threw fatal error type {}", static_cast<u32>(fatal_type));
|
||||||
switch (fatal_type) {
|
switch (fatal_type) {
|
||||||
case FatalType::ErrorReportAndScreen:
|
case FatalType::ErrorReportAndScreen:
|
||||||
@@ -141,7 +141,7 @@ void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) {
|
|||||||
LOG_ERROR(Service_Fatal, "called");
|
LOG_ERROR(Service_Fatal, "called");
|
||||||
IPC::RequestParser rp(ctx);
|
IPC::RequestParser rp(ctx);
|
||||||
auto error_code = rp.Pop<ResultCode>();
|
auto error_code = rp.Pop<ResultCode>();
|
||||||
auto fatal_type = rp.PopRaw<FatalType>();
|
auto fatal_type = rp.PopEnum<FatalType>();
|
||||||
|
|
||||||
ThrowFatalError(error_code, fatal_type, {}); // No info is passed with ThrowFatalWithPolicy
|
ThrowFatalError(error_code, fatal_type, {}); // No info is passed with ThrowFatalWithPolicy
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
@@ -152,7 +152,7 @@ void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx)
|
|||||||
LOG_ERROR(Service_Fatal, "called");
|
LOG_ERROR(Service_Fatal, "called");
|
||||||
IPC::RequestParser rp(ctx);
|
IPC::RequestParser rp(ctx);
|
||||||
auto error_code = rp.Pop<ResultCode>();
|
auto error_code = rp.Pop<ResultCode>();
|
||||||
auto fatal_type = rp.PopRaw<FatalType>();
|
auto fatal_type = rp.PopEnum<FatalType>();
|
||||||
auto fatal_info = ctx.ReadBuffer();
|
auto fatal_info = ctx.ReadBuffer();
|
||||||
FatalInfo info{};
|
FatalInfo info{};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user