Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion UI/ImDebugger/ImDebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,21 @@ static void DrawBreakpointsView(MIPSDebugInterface *mipsDebug, ImConfig &cfg) {
if (ImGui::BeginChild("mc_edit")) {
auto &mc = mcs[cfg.selectedMemCheck];
ImGui::TextUnformatted("Edit memcheck");
if (ImGui::BeginCombo("Condition", MemCheckConditionToString(mc.cond))) {
if (ImGui::Selectable("Read", mc.cond == MemCheckCondition::MEMCHECK_READ)) {
mc.cond = MemCheckCondition::MEMCHECK_READ;
}
if (ImGui::Selectable("Write", mc.cond == MemCheckCondition::MEMCHECK_WRITE)) {
mc.cond = MemCheckCondition::MEMCHECK_WRITE;
}
if (ImGui::Selectable("Read / Write", mc.cond == MemCheckCondition::MEMCHECK_READWRITE)) {
mc.cond = MemCheckCondition::MEMCHECK_READWRITE;
}
if (ImGui::Selectable("Write On Change", mc.cond == MemCheckCondition::MEMCHECK_WRITE_ONCHANGE)) {
mc.cond = MemCheckCondition::MEMCHECK_WRITE_ONCHANGE;
}
ImGui::EndCombo();
}
ImGui::CheckboxFlags("Enabled", (int *)&mc.result, (int)BREAK_ACTION_PAUSE);
ImGui::InputScalar("Start", ImGuiDataType_U32, &mc.start, NULL, NULL, "%08x", ImGuiInputTextFlags_CharsHexadecimal);
ImGui::InputScalar("End", ImGuiDataType_U32, &mc.end, NULL, NULL, "%08x", ImGuiInputTextFlags_CharsHexadecimal);
Expand Down Expand Up @@ -1019,7 +1034,7 @@ void DrawMediaDecodersView(ImConfig &cfg, ImControl &control) {
auto iter = mpegCtxs.find(cfg.selectedMpegCtx);
if (iter != mpegCtxs.end()) {
const MpegContext *ctx = iter->second;
char temp[16];
char temp[28];
snprintf(temp, sizeof(temp), "sceMpeg context at %08x", iter->first);
if (ctx && ImGui::CollapsingHeader(temp, ImGuiTreeNodeFlags_DefaultOpen)) {
// ImGui::ProgressBar((float)sas->CurPos() / (float)info.fileDataEnd, ImVec2(200.0f, 0.0f));
Expand Down
6 changes: 6 additions & 0 deletions UI/ImDebugger/ImMemView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ void ImMemView::Draw(ImDrawList *drawList) {
const ImColor secondarySelFg = 0xFFFFFFFF;
const ImColor secondarySelBg = 0xFF808080;

const ImColor zeroColor = 0x888888ff;

if (address + j >= selectRangeStart_ && address + j < selectRangeEnd_ && !searching_) {
if (asciiSelected_) {
hexBGCol = secondarySelBg;
Expand Down Expand Up @@ -180,6 +182,10 @@ void ImMemView::Draw(ImDrawList *drawList) {
int bgWidth = 2; // continueRect ? 3 : 2;
drawList->AddRectFilled(ImVec2(canvas_p0.x + hexX - 1, canvas_p0.y + rowY), ImVec2(canvas_p0.x + hexX + charWidth_ * bgWidth, canvas_p0.y + rowY + charHeight_), bg);
}
if (temp[0] == '0' && temp[1] == '0') {
// if the byte is all zero make it darker
fg = zeroColor;
}
drawList->AddText(ImVec2(canvas_p0.x + hexX, canvas_p0.y + rowY), fg, &temp[0], &temp[2]);
if (underline >= 0) {
float x = canvas_p0.x + hexX + underline * charWidth_;
Expand Down
Loading