Merge pull request #445 from greggameplayer/patch-2
Properly rename functions of Fatal Module & add ThrowFatal to this module
This commit is contained in:
commit
ff54287a73
@ -13,7 +13,7 @@ namespace Service::Fatal {
|
|||||||
Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
|
Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
|
||||||
: ServiceFramework(name), module(std::move(module)) {}
|
: ServiceFramework(name), module(std::move(module)) {}
|
||||||
|
|
||||||
void Module::Interface::FatalSimple(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp(ctx);
|
IPC::RequestParser rp(ctx);
|
||||||
u32 error_code = rp.Pop<u32>();
|
u32 error_code = rp.Pop<u32>();
|
||||||
NGLOG_WARNING(Service_Fatal, "(STUBBED) called, error_code=0x{:X}", error_code);
|
NGLOG_WARNING(Service_Fatal, "(STUBBED) called, error_code=0x{:X}", error_code);
|
||||||
@ -21,7 +21,7 @@ void Module::Interface::FatalSimple(Kernel::HLERequestContext& ctx) {
|
|||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::Interface::TransitionToFatalError(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx) {
|
||||||
NGLOG_WARNING(Service_Fatal, "(STUBBED) called");
|
NGLOG_WARNING(Service_Fatal, "(STUBBED) called");
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
@ -14,8 +14,8 @@ public:
|
|||||||
public:
|
public:
|
||||||
Interface(std::shared_ptr<Module> module, const char* name);
|
Interface(std::shared_ptr<Module> module, const char* name);
|
||||||
|
|
||||||
void FatalSimple(Kernel::HLERequestContext& ctx);
|
void ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx);
|
||||||
void TransitionToFatalError(Kernel::HLERequestContext& ctx);
|
void ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::shared_ptr<Module> module;
|
std::shared_ptr<Module> module;
|
||||||
|
@ -8,8 +8,9 @@ namespace Service::Fatal {
|
|||||||
|
|
||||||
Fatal_U::Fatal_U(std::shared_ptr<Module> module) : Module::Interface(std::move(module), "fatal:u") {
|
Fatal_U::Fatal_U(std::shared_ptr<Module> module) : Module::Interface(std::move(module), "fatal:u") {
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{1, &Fatal_U::FatalSimple, "FatalSimple"},
|
{0, nullptr, "ThrowFatal"},
|
||||||
{2, &Fatal_U::TransitionToFatalError, "TransitionToFatalError"},
|
{1, &Fatal_U::ThrowFatalWithPolicy, "ThrowFatalWithPolicy"},
|
||||||
|
{2, &Fatal_U::ThrowFatalWithCpuContext, "ThrowFatalWithCpuContext"},
|
||||||
};
|
};
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user