mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 22:11:26 +12:00
debugger: Don't refresh no-thread window at a high rate
This commit is contained in:
parent
58dd2bff41
commit
b01220d2c5
3 changed files with 13 additions and 8 deletions
|
@ -763,19 +763,20 @@ std::function<cpu_thread*()> debugger_frame::make_check_cpu(cpu_thread* cpu)
|
|||
|
||||
void debugger_frame::UpdateUI()
|
||||
{
|
||||
if (m_ui_update_ctr % 5 == 0)
|
||||
const auto cpu = get_cpu();
|
||||
|
||||
// Refresh at a high rate during initialization (looks weird otherwise)
|
||||
if (m_ui_update_ctr % (cpu || m_ui_update_ctr < 200 || m_debugger_list->m_dirty_flag ? 5 : 50) == 0)
|
||||
{
|
||||
// If no change to instruction position happened, update instruction list at 20hz
|
||||
ShowPC();
|
||||
|
||||
if (m_ui_update_ctr % 20 == 0)
|
||||
{
|
||||
// Update threads list at 5hz (low priority)
|
||||
UpdateUnitList();
|
||||
}
|
||||
}
|
||||
|
||||
const auto cpu = get_cpu();
|
||||
if (m_ui_update_ctr % 20 == 0)
|
||||
{
|
||||
// Update threads list at 5hz (low priority)
|
||||
UpdateUnitList();
|
||||
}
|
||||
|
||||
if (!cpu)
|
||||
{
|
||||
|
|
|
@ -120,6 +120,8 @@ void debugger_list::ShowAddress(u32 addr, bool select_addr, bool direct)
|
|||
m_follow_thread = false;
|
||||
}
|
||||
|
||||
m_dirty_flag = false;
|
||||
|
||||
u32 pc = m_start_addr;
|
||||
|
||||
if (!direct && (m_follow_thread || select_addr))
|
||||
|
@ -396,6 +398,7 @@ void debugger_list::resizeEvent(QResizeEvent* event)
|
|||
for (u32 i = old_size; i < m_item_count; ++i)
|
||||
{
|
||||
insertItem(i, new QListWidgetItem(""));
|
||||
m_dirty_flag = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -23,6 +23,7 @@ public:
|
|||
u32 m_selected_instruction = -1;
|
||||
bool m_follow_thread = true; // If true, follow the selected thread to wherever it goes in code
|
||||
bool m_showing_selected_instruction = false;
|
||||
bool m_dirty_flag = false;
|
||||
QColor m_color_bp;
|
||||
QColor m_color_pc;
|
||||
QColor m_text_color_bp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue