Skip to content

Commit

Permalink
option on profile
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Apr 7, 2021
1 parent caf3dea commit 39064ef
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
6 changes: 5 additions & 1 deletion source/guis/gui_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void GuiMain::draw() {

std::string buttonHintStr = "";

buttonHintStr = !tmpEditableOnly ? "\uE0E6 Editable titles " : "\uE0E6 All titles ";
buttonHintStr = !tmpEditableOnly ? "\uE0E4 Config \uE0E6 Editable titles " : "\uE0E6 All titles ";
buttonHintStr += m_backupAll ? "(\uE0E7) + \uE0E2 Backup all " : "(\uE0E7) + \uE0E2 Backup ";
buttonHintStr += "\uE0E1 Back \uE0E0 OK";

Expand All @@ -209,6 +209,10 @@ void GuiMain::draw() {
void GuiMain::onInput(u32 kdown) {
if (kdown & KEY_B)
Gui::g_requestExit = true;
else if (kdown & KEY_L)
{
Gui::g_nextGui = GUI_CHOOSE_MISSION;
}

if (Title::g_titles.size() == 0) return;

Expand Down
36 changes: 34 additions & 2 deletions source/guis/gui_sysmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,16 @@ void GuiSysmodule::draw() {
// if (hidMitmInstalled())
// Gui::drawTextAligned(font20, Gui::g_framebuffer_width - 50, Gui::g_framebuffer_height - 25, currTheme.textColor, "\uE0E2 Key configuration \uE0E1 Back \uE0E0 OK", ALIGNED_RIGHT);
// else
Gui::drawTextAligned(font20, Gui::g_framebuffer_width - 50, Gui::g_framebuffer_height - 51, currTheme.textColor, "\uE0E1 Back \uE0E0 OK", ALIGNED_RIGHT);

Gui::drawTextAligned(font20, Gui::g_framebuffer_width - 50, Gui::g_framebuffer_height - 51, currTheme.textColor, "\uE0E1 Back \uE0E0 OK", ALIGNED_RIGHT);
{
FILE *exefs = fopen(std::string(CONTENTS_PATH "0100000000001013/exefs.nsp").c_str(), "r");
if ((exefs == nullptr) && (access(CONTENTS_PATH "0100000000001013/exefs.nsp1", F_OK) == 0))
Gui::drawTextAligned(font20, Gui::g_framebuffer_width - 500, Gui::g_framebuffer_height - 51, currTheme.textColor, "\uE0E2 Make profile launch EdiZon SE", ALIGNED_RIGHT);
else {
Gui::drawTextAligned(font20, Gui::g_framebuffer_width - 500, Gui::g_framebuffer_height - 51, currTheme.textColor, "\uE0E3 Make profile launch profile", ALIGNED_RIGHT);
fclose(exefs);
}
}
if (anyModulesPresent)
Gui::drawTextAligned(font20, Gui::g_framebuffer_width / 2, 100, currTheme.textColor, "Enable as little background services (sysmodules) as possible for maximum compatibility with\ngames. If you encounter problem try disable all of them to see if it helps to improve stability.\nDo not enable tesla if you are on HOS11+ when running Edizon SE.", ALIGNED_CENTER);
else
Expand All @@ -245,6 +253,30 @@ void GuiSysmodule::onInput(u32 kdown) {
else
Gui::g_nextGui = GUI_CHOOSE_MISSION;
}
else if ((kdown & KEY_X) && (access(CONTENTS_PATH "0100000000001013/exefs.nsp1", F_OK) == 0))
{
try
{
if (access(CONTENTS_PATH "0100000000001013/exefs.nsp", F_OK) == -1)
rename(CONTENTS_PATH "0100000000001013/exefs.nsp1", CONTENTS_PATH "0100000000001013/exefs.nsp");
}
catch (json::parse_error &e)
{
}
}
else if ((kdown & KEY_Y) && (access(CONTENTS_PATH "0100000000001013/exefs.nsp", F_OK) == 0))
{
try
{
if (access(CONTENTS_PATH "0100000000001013/exefs.nsp1", F_OK) == -1)
rename(CONTENTS_PATH "0100000000001013/exefs.nsp", CONTENTS_PATH "0100000000001013/exefs.nsp1");
else
remove(CONTENTS_PATH "0100000000001013/exefs.nsp");
}
catch (json::parse_error &e)
{
}
}
// if (hidMitmInstalled() && kdown & KEY_X)
// Gui::g_nextGui = GUI_HID_MITM;

Expand Down

0 comments on commit 39064ef

Please sign in to comment.