From c9a842f7df96f00be4c852c2e9de6b5728de3938 Mon Sep 17 00:00:00 2001 From: tomvita <68505331+tomvita@users.noreply.github.com> Date: Sun, 20 Dec 2020 17:17:42 +0800 Subject: [PATCH] auto attach dmnt if freeze or add to code is required --- source/guis/gui_cheats.cpp | 12 ++++++++++++ source/main.cpp | 1 + 2 files changed, 13 insertions(+) diff --git a/source/guis/gui_cheats.cpp b/source/guis/gui_cheats.cpp index 7b8f9e34..d9b2e3a7 100644 --- a/source/guis/gui_cheats.cpp +++ b/source/guis/gui_cheats.cpp @@ -2116,6 +2116,12 @@ void GuiCheats::onInput(u32 kdown) { if (kdown & KEY_X && m_memoryDump->getDumpInfo().dumpType == DumpType::ADDR && !(kheld & KEY_ZL)) { + if (!(m_debugger->m_dmnt)) + { + m_debugger->detatch(); + dmntchtForceOpenCheatProcess(); + printf("force open called\n"); + } u64 address = 0; m_memoryDump->getData((m_selectedEntry + m_addresslist_offset) * sizeof(u64), &address, sizeof(u64)); @@ -2304,6 +2310,12 @@ void GuiCheats::onInput(u32 kdown) // m_showpointermenu = true; if (m_menuLocation == CANDIDATES && m_memoryDumpBookmark->size() != 0) { + if (!(m_debugger->m_dmnt)) + { + m_debugger->detatch(); + dmntchtForceOpenCheatProcess(); + printf("force open called\n"); + } bookmark_t bookmark; m_AttributeDumpBookmark->getData((m_selectedEntry + m_addresslist_offset) * sizeof(bookmark_t), &bookmark, sizeof(bookmark_t)); // printf("m_selectedEntry + m_addresslist_offset %ld\n", m_selectedEntry + m_addresslist_offset); diff --git a/source/main.cpp b/source/main.cpp index 83d0ab87..8c60187b 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -131,6 +131,7 @@ bool firstruncheck() { Config::getConfig()->not_first_run = true; Config::getConfig()->options[0] = true; // No Auto Attach for fetching of game code + Config::getConfig()->options[2] = true; // Disable config screen Config::writeConfig(); return true; }