Skip to content

Commit

Permalink
display and preserve Alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Mar 10, 2022
1 parent ac26ab3 commit 07ffc9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion include/guis/gui_cheats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ struct MultiSearch_t
u32 target = 0;
u32 count = 0, first = 0, last = 0, size = 0, adjustment = 0, target_offset = 0;
MultiSearchEntry_t Entries[M_ENTRY_MAX];
u32 Alignment = 0x10;
};
struct fromto32_t
{
Expand Down Expand Up @@ -133,7 +134,7 @@ class GuiCheats : public Gui
MemoryDump *m_PC_DumpTo = nullptr; // File to hold list of "To" to be process next

#define M_TARGET m_multisearch.Entries[m_multisearch.target]
#define M_ALIGNMENT m_MTalignment
#define M_ALIGNMENT m_multisearch.Alignment
#define FORWARD_DEPTH 2
struct forward_chain_t
{
Expand Down
7 changes: 3 additions & 4 deletions source/guis/gui_cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ static const std::vector<s128> dataTypeMinValues = {std::numeric_limits<u8>::min
static std::string titleNameStr, tidStr, pidStr, buildIDStr, cheatpathStr;

static u32 cheatListOffset = 0;
static u32 m_MTalignment = 0x10;
static bool _isAddressFrozen(uintptr_t);
static std::string _getAddressDisplayString(u64, Debugger *debugger, searchType_t searchType);
static std::string _getValueDisplayString(searchValue_t searchValue, searchType_t searchType);
Expand Down Expand Up @@ -1741,6 +1740,7 @@ void GuiCheats::drawEditExtraSearchValues()
ss.str("");
ss << "\uE132 Multi Target Memory Search";
ss << " [ " << regionNames[m_searchRegion] << " ]";
ss << " Alignment = " << m_multisearch.Alignment;
// ss << " line = " << m_selectedEntry / 6;
}
Gui::drawText(font24, 120, 70, currTheme.textColor, ss.str().c_str());
Expand Down Expand Up @@ -2174,9 +2174,8 @@ static int MTinihandler(void *user, const char *section, const char *name, const
C_ENTRY.value2._s64 = std::strtol(value, nullptr, 0);
break;
};
} else if M_NAME ("alignment") {
m_MTalignment = std::strtol(value, nullptr, 0);
printf("m_MTalignment = %d\n",m_MTalignment);
} else if M_NAME ("Alignment") {
pconfig->Alignment = std::strtol(value, nullptr, 0);
} else if M_NAME ("On") {
C_ENTRY.on = ON;
} else if M_NAME ("Off") {
Expand Down

0 comments on commit 07ffc9b

Please sign in to comment.