mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-24 19:54:22 -04:00
scs: implement EventHandlerThread for shell
This commit is contained in:
parent
aa2dce7316
commit
1a1b1355ba
7 changed files with 377 additions and 5 deletions
|
@ -96,6 +96,27 @@ namespace ams::pm {
|
|||
struct ProcessEventInfo {
|
||||
u32 event;
|
||||
os::ProcessId process_id;
|
||||
|
||||
inline ProcessEvent GetProcessEvent() const {
|
||||
if (hos::GetVersion() >= hos::Version_5_0_0) {
|
||||
return static_cast<ProcessEvent>(this->event);
|
||||
}
|
||||
switch (static_cast<ProcessEventDeprecated>(event)) {
|
||||
case ProcessEventDeprecated::None:
|
||||
return ProcessEvent::None;
|
||||
case ProcessEventDeprecated::Exited:
|
||||
return ProcessEvent::Exited;
|
||||
case ProcessEventDeprecated::Started:
|
||||
return ProcessEvent::Started;
|
||||
case ProcessEventDeprecated::Exception:
|
||||
return ProcessEvent::Exception;
|
||||
case ProcessEventDeprecated::DebugRunning:
|
||||
return ProcessEvent::DebugRunning;
|
||||
case ProcessEventDeprecated::DebugBreak:
|
||||
return ProcessEvent::DebugBreak;
|
||||
AMS_UNREACHABLE_DEFAULT_CASE();
|
||||
}
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(ProcessEventInfo) == 0x10 && util::is_pod<ProcessEventInfo>::value, "ProcessEventInfo definition!");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue