Skip to content

Commit

Permalink
autoexitcheck added
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Oct 4, 2020
1 parent 4b91b73 commit ad38899
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/guis/gui_cheats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class GuiCheats : public Gui
bool m_havesave = true;
void iconloadcheck();
bool autoattachcheck();
bool autoexitcheck();
void testlz();
struct PointerSearch_state
{
Expand Down
12 changes: 12 additions & 0 deletions source/guis/gui_cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1513,6 +1513,7 @@ void GuiCheats::onInput(u32 kdown)
else
dmntchtForceCloseCheatProcess();
printf("dmnt toggled \n");
if (autoexitcheck()) Gui::g_requestExit = true;
return;
};
Gui::g_requestExit = true;
Expand Down Expand Up @@ -5900,6 +5901,17 @@ bool GuiCheats::autoattachcheck()
return false;
// testlz();
}
bool GuiCheats::autoexitcheck()
{
std::stringstream filenoiconStr;
filenoiconStr << EDIZON_DIR "/noautoexit.txt";
if (access(filenoiconStr.str().c_str(), F_OK) != 0)
{
return true;
}
else
return false;
}
void GuiCheats::testlz()
{
time_t unixTime1 = time(NULL);
Expand Down

0 comments on commit ad38899

Please sign in to comment.