@@ -65,29 +65,32 @@ void PCSX::Widgets::CallStacks::draw(const char* title, PCSX::GUI* gui) {
65
65
ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags_Bullet | ImGuiTreeNodeFlags_DefaultOpen;
66
66
if (isCurrent) flags |= ImGuiTreeNodeFlags_Selected;
67
67
if (!ImGui::TreeNodeEx (label.c_str (), flags)) continue ;
68
+ int callId = 0 ;
68
69
for (auto & call : stack.calls ) {
69
- std::string label = fmt::format (" 0x{:08x}" , call.ra );
70
+ ImGui::PushID (callId++);
71
+ std::string label = fmt::format (" 0x{:08x}##lowsp" , call.ra );
70
72
if (ImGui::Button (label.c_str ())) {
71
73
g_system->m_eventBus ->signal (PCSX::Events::GUI::JumpToPC{call.ra });
72
74
}
73
75
ImGui::SameLine ();
74
76
ImGui::TextUnformatted (" :: " );
75
77
ImGui::SameLine ();
76
- label = fmt::format (" 0x{:08x}" , call.sp );
78
+ label = fmt::format (" 0x{:08x}##highsp " , call.sp );
77
79
if (ImGui::Button (label.c_str ())) {
78
80
g_system->m_eventBus ->signal (PCSX::Events::GUI::JumpToMemory{call.sp , 4 });
79
81
}
80
82
ImGui::SameLine ();
81
83
ImGui::TextUnformatted (" :: " );
82
84
ImGui::SameLine ();
83
- label = fmt::format (" 0x{:08x}" , call.fp );
85
+ label = fmt::format (" 0x{:08x}##frame " , call.fp );
84
86
if (ImGui::Button (label.c_str ())) {
85
87
g_system->m_eventBus ->signal (PCSX::Events::GUI::JumpToMemory{call.fp , 1 });
86
88
}
87
89
drawSymbol (call.ra );
90
+ ImGui::PopID ();
88
91
}
89
92
if (stack.ra != 0 ) {
90
- std::string label = fmt::format (" 0x{:08x}" , stack.ra );
93
+ std::string label = fmt::format (" 0x{:08x}##ralowsp " , stack.ra );
91
94
if (ImGui::Button (label.c_str ())) {
92
95
g_system->m_eventBus ->signal (PCSX::Events::GUI::JumpToPC{stack.ra });
93
96
}
@@ -100,7 +103,7 @@ void PCSX::Widgets::CallStacks::draw(const char* title, PCSX::GUI* gui) {
100
103
ImGui::SameLine ();
101
104
ImGui::TextUnformatted (" :: " );
102
105
ImGui::SameLine ();
103
- label = fmt::format (" 0x{:08x}" , stack.fp );
106
+ label = fmt::format (" 0x{:08x}##raframe " , stack.fp );
104
107
if (ImGui::Button (label.c_str ())) {
105
108
g_system->m_eventBus ->signal (PCSX::Events::GUI::JumpToMemory{stack.fp , 1 });
106
109
}
0 commit comments