mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-03-21 17:49:58 -05:00
PerformanceMetrics: Clamp graph minimum auto size
Add a minimum value for the automatic size of the performance metrics graph. The graph can still be manually resized smaller than this limit. This prevents the graph from automatically resizing itself to be too small to contain the full graph and legend, which happened when using native resolution with `Auto-Adjust Window Size` enabled.
This commit is contained in:
parent
f7b7267993
commit
0bf34a73b3
|
|
@ -170,8 +170,11 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale)
|
|||
ImGui::SetWindowPos(ImVec2(clamped_window_x, clamped_window_y), ImGuiCond_Always);
|
||||
};
|
||||
|
||||
const float graph_width = display_size.x / 4.0;
|
||||
const float graph_height = display_size.y / 4.0;
|
||||
const float min_auto_graph_width = 200.f * backbuffer_scale + 2.f * window_padding;
|
||||
const float min_auto_graph_height = 144.f * backbuffer_scale + 2.f * window_padding;
|
||||
|
||||
const float graph_width = std::max(min_auto_graph_width, display_size.x / 4.f);
|
||||
const float graph_height = std::max(min_auto_graph_height, display_size.y / 4.f);
|
||||
|
||||
const bool stack_vertically = !g_ActiveConfig.bShowGraphs;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user