diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-07-06 19:41:38 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-09-22 04:25:18 +0200 |
commit | a7fda849023664212f152adbb0ceed17b246acb0 (patch) | |
tree | a044ce020d218eacedebd2cca77e7c87185a55da /src/core/hle/service/am/am.cpp | |
parent | am: Add RequestExit event to AppletMessageQueue (diff) | |
download | yuzu-a7fda849023664212f152adbb0ceed17b246acb0.tar yuzu-a7fda849023664212f152adbb0ceed17b246acb0.tar.gz yuzu-a7fda849023664212f152adbb0ceed17b246acb0.tar.bz2 yuzu-a7fda849023664212f152adbb0ceed17b246acb0.tar.lz yuzu-a7fda849023664212f152adbb0ceed17b246acb0.tar.xz yuzu-a7fda849023664212f152adbb0ceed17b246acb0.tar.zst yuzu-a7fda849023664212f152adbb0ceed17b246acb0.zip |
Diffstat (limited to 'src/core/hle/service/am/am.cpp')
-rw-r--r-- | src/core/hle/service/am/am.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index c98fefdeb..7d8649642 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -232,12 +232,12 @@ IDebugFunctions::IDebugFunctions() : ServiceFramework{"IDebugFunctions"} { IDebugFunctions::~IDebugFunctions() = default; -ISelfController::ISelfController(Core::System& system_, - std::shared_ptr<NVFlinger::NVFlinger> nvflinger_) - : ServiceFramework("ISelfController"), nvflinger(std::move(nvflinger_)) { +ISelfController::ISelfController(Core::System& system, + std::shared_ptr<NVFlinger::NVFlinger> nvflinger) + : ServiceFramework("ISelfController"), system(system), nvflinger(std::move(nvflinger)) { // clang-format off static const FunctionInfo functions[] = { - {0, nullptr, "Exit"}, + {0, &ISelfController::Exit, "Exit"}, {1, &ISelfController::LockExit, "LockExit"}, {2, &ISelfController::UnlockExit, "UnlockExit"}, {3, &ISelfController::EnterFatalSection, "EnterFatalSection"}, @@ -298,6 +298,15 @@ ISelfController::ISelfController(Core::System& system_, ISelfController::~ISelfController() = default; +void ISelfController::Exit(Kernel::HLERequestContext& ctx) { + LOG_DEBUG(Service_AM, "called"); + + system.Shutdown(); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); +} + void ISelfController::LockExit(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_AM, "(STUBBED) called"); |