mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-23 03:06:52 -04:00
fatal: Skeleton tasks, write ThrowFatalImpl.
This commit is contained in:
parent
b9091e9466
commit
21b0f228b6
9 changed files with 164 additions and 7 deletions
|
@ -15,8 +15,15 @@
|
|||
*/
|
||||
|
||||
#include <switch.h>
|
||||
#include "fatal_types.hpp"
|
||||
#include "fatal_event_manager.hpp"
|
||||
|
||||
static FatalEventManager g_event_manager;
|
||||
|
||||
FatalEventManager *GetEventManager() {
|
||||
return &g_event_manager;
|
||||
}
|
||||
|
||||
FatalEventManager::FatalEventManager() {
|
||||
/* Just create all the events. */
|
||||
for (size_t i = 0; i < FatalEventManager::NumFatalEvents; i++) {
|
||||
|
@ -31,7 +38,7 @@ Result FatalEventManager::GetEvent(Handle *out) {
|
|||
|
||||
/* Only allow GetEvent to succeed NumFatalEvents times. */
|
||||
if (this->events_gotten >= FatalEventManager::NumFatalEvents) {
|
||||
return 0x8A3;
|
||||
return FatalResult_TooManyEvents;
|
||||
}
|
||||
|
||||
*out = this->events[this->events_gotten++].revent;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue