Save Errors
Tag Debug Func of ui7
This commit is contained in:
parent
6e8f3f0f8b
commit
04c56a98d5
@ -5,8 +5,20 @@
|
|||||||
#include <renderd7/internal_db.hpp>
|
#include <renderd7/internal_db.hpp>
|
||||||
#include <renderd7/renderd7.hpp>
|
#include <renderd7/renderd7.hpp>
|
||||||
|
|
||||||
|
void rd7i_save_report(const std::string& msg) {
|
||||||
|
auto ts = RenderD7::GetTimeStr();
|
||||||
|
std::ofstream f("sdmc:/RenderD7/Reports/report_" + ts + ".txt");
|
||||||
|
f << "RenderD7 Error [" << rd7i_app_name << ", " << ts << "]" << std::endl;
|
||||||
|
f << "Error Message: " << std::endl;
|
||||||
|
f << msg << std::endl;
|
||||||
|
f << "SysInfo: " << std::endl;
|
||||||
|
f << "- Citra -> " << (rd7i_is_citra ? "true" : "false") << std::endl;
|
||||||
|
f.close();
|
||||||
|
}
|
||||||
|
|
||||||
namespace RenderD7 {
|
namespace RenderD7 {
|
||||||
void Error(const std::string& msg) {
|
void Error(const std::string& msg) {
|
||||||
|
rd7i_save_report(msg);
|
||||||
/*if (rd7i_graphics_on) {
|
/*if (rd7i_graphics_on) {
|
||||||
C3D_FrameEnd(0);
|
C3D_FrameEnd(0);
|
||||||
while (aptMainLoop()) {
|
while (aptMainLoop()) {
|
||||||
@ -31,6 +43,7 @@ void Error(const std::string& msg) {
|
|||||||
gfxInitDefault();
|
gfxInitDefault();
|
||||||
consoleInit(GFX_TOP, NULL);
|
consoleInit(GFX_TOP, NULL);
|
||||||
printf("RENDERD7 - ERROR MANAGER\n\n%s\n", msg.c_str());
|
printf("RENDERD7 - ERROR MANAGER\n\n%s\n", msg.c_str());
|
||||||
|
printf("Report Saved in\nsdmc:/RenderD7/Reports\n");
|
||||||
printf("Press Start to Exit\n");
|
printf("Press Start to Exit\n");
|
||||||
while (aptMainLoop()) {
|
while (aptMainLoop()) {
|
||||||
hidScanInput();
|
hidScanInput();
|
||||||
|
@ -85,6 +85,7 @@ struct UI7OBJ {
|
|||||||
type = i1;
|
type = i1;
|
||||||
s = rd7i_current_screen;
|
s = rd7i_current_screen;
|
||||||
}
|
}
|
||||||
|
// Killer Function
|
||||||
void Debug() {
|
void Debug() {
|
||||||
RenderD7::OnScreen(s ? Top : Bottom);
|
RenderD7::OnScreen(s ? Top : Bottom);
|
||||||
auto clr = UI7CtxDebugCol(type);
|
auto clr = UI7CtxDebugCol(type);
|
||||||
|
@ -124,6 +124,7 @@ void rd7i_init_config() {
|
|||||||
rd7i_config_path = "sdmc:/RenderD7/Apps/";
|
rd7i_config_path = "sdmc:/RenderD7/Apps/";
|
||||||
rd7i_config_path += rd7i_app_name;
|
rd7i_config_path += rd7i_app_name;
|
||||||
std::filesystem::create_directories(rd7i_config_path.c_str());
|
std::filesystem::create_directories(rd7i_config_path.c_str());
|
||||||
|
std::filesystem::create_directories("sdmc:/RenderD7/Reports");
|
||||||
bool renew = false;
|
bool renew = false;
|
||||||
|
|
||||||
if (RenderD7::FS::FileExist(rd7i_config_path + "/config.rc7")) {
|
if (RenderD7::FS::FileExist(rd7i_config_path + "/config.rc7")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user