Skip to content

Commit

Permalink
bookmark delete done
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Jul 21, 2020
1 parent 550fc7f commit c35845d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/guis/gui_cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ GuiCheats::GuiCheats() : Gui()
{
address = bookmark.offset + m_mainBaseAddr;
}
if (bookmark.deleted) continue; // don't add deleted bookmark
// check memory before adding
MemoryInfo meminfo;
meminfo = m_debugger->queryMemory(address);
Expand Down Expand Up @@ -624,7 +625,7 @@ void GuiCheats::draw()
ss << "And " << std::dec << ((m_memoryDump->size() / sizeof(u64)) - 8) << " others...";

Gui::drawRectangle(Gui::g_framebuffer_width - 555, 300 + line * 40, 545, 40, (m_selectedEntry == line && m_menuLocation == CANDIDATES) ? currTheme.highlightColor : line % 2 == 0 ? currTheme.backgroundColor : currTheme.separatorColor);
Gui::drawTextAligned(font14, Gui::g_framebuffer_width - 545, 305 + line * 40, (m_selectedEntry == line && m_menuLocation == CANDIDATES) ? COLOR_BLACK : currTheme.textColor, bookmark.label, ALIGNED_LEFT);
Gui::drawTextAligned(font14, Gui::g_framebuffer_width - 545, 305 + line * 40, (m_selectedEntry == line && m_menuLocation == CANDIDATES) ? COLOR_BLACK : currTheme.textColor, bookmark.deleted ? "To be deleted" : bookmark.label, ALIGNED_LEFT);
Gui::drawTextAligned(font14, Gui::g_framebuffer_width - 340, 305 + line * 40, (m_selectedEntry == line && m_menuLocation == CANDIDATES) ? COLOR_BLACK : currTheme.textColor, ss.str().c_str(), ALIGNED_LEFT);
}
}
Expand Down Expand Up @@ -1359,7 +1360,7 @@ void GuiCheats::onInput(u32 kdown)
{ //Bookmark case
bookmark_t bookmark;
m_AttributeDumpBookmark->getData((m_selectedEntry + m_addresslist_offset) * sizeof(bookmark_t), &bookmark, sizeof(bookmark_t));
bookmark.deleted = true;
bookmark.deleted = !bookmark.deleted;
m_AttributeDumpBookmark->putData((m_selectedEntry + m_addresslist_offset) * sizeof(bookmark_t), &bookmark, sizeof(bookmark_t));
// m_memoryDumpBookmark->flushBuffer();
// m_memoryDump = m_memoryDump1;
Expand Down

0 comments on commit c35845d

Please sign in to comment.