summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-05-18 03:47:47 +0200
committerZach Hilman <zachhilman@gmail.com>2019-05-25 22:09:20 +0200
commit24392c8ec83b1b3f0b90bc80f37466c9a853f63d (patch)
tree53f2f13b285a868361dd13c5b840c4e788dbc2e8 /src/core
parentapplets: Save report on stubbed applet (diff)
downloadyuzu-24392c8ec83b1b3f0b90bc80f37466c9a853f63d.tar
yuzu-24392c8ec83b1b3f0b90bc80f37466c9a853f63d.tar.gz
yuzu-24392c8ec83b1b3f0b90bc80f37466c9a853f63d.tar.bz2
yuzu-24392c8ec83b1b3f0b90bc80f37466c9a853f63d.tar.lz
yuzu-24392c8ec83b1b3f0b90bc80f37466c9a853f63d.tar.xz
yuzu-24392c8ec83b1b3f0b90bc80f37466c9a853f63d.tar.zst
yuzu-24392c8ec83b1b3f0b90bc80f37466c9a853f63d.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/am/applets/error.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/core/hle/service/am/applets/error.cpp b/src/core/hle/service/am/applets/error.cpp
index 04774bedc..af3a900f8 100644
--- a/src/core/hle/service/am/applets/error.cpp
+++ b/src/core/hle/service/am/applets/error.cpp
@@ -9,8 +9,10 @@
#include "common/string_util.h"
#include "core/core.h"
#include "core/frontend/applets/error.h"
+#include "core/hle/kernel/process.h"
#include "core/hle/service/am/am.h"
#include "core/hle/service/am/applets/error.h"
+#include "core/reporter.h"
namespace Service::AM::Applets {
@@ -143,9 +145,12 @@ void Error::Execute() {
}
const auto callback = [this] { DisplayCompleted(); };
+ const auto title_id = Core::CurrentProcess()->GetTitleID();
+ const auto& reporter{Core::System::GetInstance().GetReporter()};
switch (mode) {
case ErrorAppletMode::ShowError:
+ reporter.SaveErrorReport(title_id, error_code);
frontend.ShowError(error_code, callback);
break;
case ErrorAppletMode::ShowSystemError:
@@ -156,14 +161,18 @@ void Error::Execute() {
const auto& detail_text =
system ? args->system_error.detail_text : args->application_error.detail_text;
- frontend.ShowCustomErrorText(
- error_code,
- Common::StringFromFixedZeroTerminatedBuffer(main_text.data(), main_text.size()),
- Common::StringFromFixedZeroTerminatedBuffer(detail_text.data(), detail_text.size()),
- callback);
+ const auto main_text_string =
+ Common::StringFromFixedZeroTerminatedBuffer(main_text.data(), main_text.size());
+ const auto detail_text_string =
+ Common::StringFromFixedZeroTerminatedBuffer(detail_text.data(), detail_text.size());
+
+ reporter.SaveErrorReport(title_id, error_code, main_text_string, detail_text_string);
+ frontend.ShowCustomErrorText(error_code, main_text_string, detail_text_string, callback);
break;
}
case ErrorAppletMode::ShowErrorRecord:
+ reporter.SaveErrorReport(title_id, error_code,
+ fmt::format("{:016X}", args->error_record.posix_time));
frontend.ShowErrorWithTimestamp(
error_code, std::chrono::seconds{args->error_record.posix_time}, callback);
break;