Skip to content

Commit

Permalink
auto attach dmnt if freeze or add to code is required
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Dec 20, 2020
1 parent e7cae7c commit c9a842f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/guis/gui_cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c9a842f

Please sign in to comment.