diff --git a/stratosphere/fatal/source/fatal_main.cpp b/stratosphere/fatal/source/fatal_main.cpp
index 72b006d31..ae8f0ce19 100644
--- a/stratosphere/fatal/source/fatal_main.cpp
+++ b/stratosphere/fatal/source/fatal_main.cpp
@@ -32,7 +32,7 @@ extern "C" {
u32 __nx_applet_type = AppletType_None;
- #define INNER_HEAP_SIZE 0x20000
+ #define INNER_HEAP_SIZE 0x380000
size_t nx_inner_heap_size = INNER_HEAP_SIZE;
char nx_inner_heap[INNER_HEAP_SIZE];
diff --git a/stratosphere/fatal/source/fatal_task.cpp b/stratosphere/fatal/source/fatal_task.cpp
index eb10add15..a01ac6244 100644
--- a/stratosphere/fatal/source/fatal_task.cpp
+++ b/stratosphere/fatal/source/fatal_task.cpp
@@ -18,6 +18,9 @@
#include "fatal_types.hpp"
#include "fatal_task.hpp"
+#include "fatal_task_error_report.hpp"
+
+
static constexpr size_t MaxTasks = 8;
static HosThread g_task_threads[MaxTasks];
static size_t g_num_threads = 0;
@@ -44,12 +47,12 @@ static void RunTask(IFatalTask *task) {
}
void RunFatalTasks(FatalContext *ctx, u64 title_id, bool error_report, Event *erpt_event, Event *battery_event) {
- /* TODO: RunTask(new ErrorReportTask(ctx, title_id, error_report, erpt_event); */
- /* TODO: RunTask(new PowerControlTask(ctx, title_id, battery_event); */
- /* TODO: RunTask(new ShowFatalTask(ctx, title_id, battery_event); */
- /* TODO: RunTask(new StopSoundTask(); */
- /* TODO: RunTask(new BacklightControlTask(); */
- /* TODO: RunTask(new AdjustClockTask(); */
- /* TODO: RunTask(new PowerButtonTask(erpt_event); */
- /* TODO: RunTask(new StateTransitionStop(); */
+ RunTask(new ErrorReportTask(ctx, title_id, error_report, erpt_event));
+ /* TODO: RunTask(new PowerControlTask(ctx, title_id, battery_event)); */
+ /* TODO: RunTask(new ShowFatalTask(ctx, title_id, battery_event)); */
+ /* TODO: RunTask(new StopSoundTask()); */
+ /* TODO: RunTask(new BacklightControlTask()); */
+ /* TODO: RunTask(new AdjustClockTask()); */
+ /* TODO: RunTask(new PowerButtonTask(erpt_event)); */
+ /* TODO: RunTask(new StateTransitionStop()); */
}
diff --git a/stratosphere/fatal/source/fatal_task.hpp b/stratosphere/fatal/source/fatal_task.hpp
index 63d1ca43e..ef19fbbc1 100644
--- a/stratosphere/fatal/source/fatal_task.hpp
+++ b/stratosphere/fatal/source/fatal_task.hpp
@@ -24,6 +24,7 @@ class IFatalTask {
FatalContext *ctx;
u64 title_id;
public:
+ IFatalTask(FatalContext *ctx, u64 tid) : ctx(ctx), title_id(tid) { }
virtual Result Run() = 0;
virtual const char *GetName() const = 0;
};
diff --git a/stratosphere/fatal/source/fatal_task_error_report.cpp b/stratosphere/fatal/source/fatal_task_error_report.cpp
new file mode 100644
index 000000000..72decd371
--- /dev/null
+++ b/stratosphere/fatal/source/fatal_task_error_report.cpp
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2018 Atmosphère-NX
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#include
+#include "fatal_task_error_report.hpp"
+
+Result ErrorReportTask::Run() {
+ if (this->create_report) {
+ /* Here, Nintendo creates an error report with erpt. AMS will not do that. */
+ /* TODO: Should atmosphere log reports to to the SD card? */
+ }
+
+ /* Signal we're done with our job. */
+ eventFire(this->erpt_event);
+}
\ No newline at end of file
diff --git a/stratosphere/fatal/source/fatal_task_error_report.hpp b/stratosphere/fatal/source/fatal_task_error_report.hpp
new file mode 100644
index 000000000..7ade00bcf
--- /dev/null
+++ b/stratosphere/fatal/source/fatal_task_error_report.hpp
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Atmosphère-NX
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#pragma once
+#include
+#include
+#include "fatal_task.hpp"
+
+class ErrorReportTask : public IFatalTask {
+ private:
+ bool create_report;
+ Event *erpt_event;
+ public:
+ ErrorReportTask(FatalContext *ctx, u64 title_id, bool error_report, Event *evt) : IFatalTask(ctx, title_id), create_report(error_report), erpt_event(evt) { }
+ virtual Result Run() override;
+ virtual const char *GetName() const override {
+ return "WriteErrorReport";
+ }
+};
\ No newline at end of file