diff --git a/include/guis/gui_cheats.hpp b/include/guis/gui_cheats.hpp index 40877ed1..4a1b6415 100644 --- a/include/guis/gui_cheats.hpp +++ b/include/guis/gui_cheats.hpp @@ -144,6 +144,7 @@ class GuiCheats : public Gui bool m_havesave = true; void iconloadcheck(); bool autoattachcheck(); + bool autoexitcheck(); void testlz(); struct PointerSearch_state { diff --git a/source/guis/gui_cheats.cpp b/source/guis/gui_cheats.cpp index 0ce473cc..9b404b44 100644 --- a/source/guis/gui_cheats.cpp +++ b/source/guis/gui_cheats.cpp @@ -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; @@ -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);