erpt: implement forced shutdown detection

This commit is contained in:
Michael Scire 2021-04-30 04:21:03 -07:00
parent ef0c15b764
commit 355010ad84
17 changed files with 645 additions and 53 deletions

View file

@ -18,6 +18,7 @@
#include "erpt_srv_context_impl.hpp"
#include "erpt_srv_session_impl.hpp"
#include "erpt_srv_stream.hpp"
#include "erpt_srv_forced_shutdown.hpp"
namespace ams::erpt::srv {
@ -117,8 +118,10 @@ namespace ams::erpt::srv {
case psc::PmState_ReadyAwaken:
Stream::EnableFsAccess(true);
break;
case psc::PmState_ReadySleep:
case psc::PmState_ReadyShutdown:
FinalizeForcedShutdownDetection();
[[fallthrough]];
case psc::PmState_ReadySleep:
Stream::EnableFsAccess(false);
break;
default: