mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Merge pull request #10624 from Minty-Meeo/resolve-gcc-warnings
Resolve Linux GCC Warnings
This commit is contained in:
@ -19,7 +19,10 @@ namespace BPFunctions
|
||||
struct ScissorRange
|
||||
{
|
||||
constexpr ScissorRange() = default;
|
||||
constexpr ScissorRange(int offset, int start, int end) : offset(offset), start(start), end(end) {}
|
||||
constexpr ScissorRange(int offset_, int start_, int end_)
|
||||
: offset(offset_), start(start_), end(end_)
|
||||
{
|
||||
}
|
||||
int offset = 0;
|
||||
int start = 0;
|
||||
int end = 0;
|
||||
|
@ -336,12 +336,12 @@ void Statistics::DisplayScissor()
|
||||
|
||||
// Visualization of where things are updated on screen with this specific scissor
|
||||
ImGui::TableNextColumn();
|
||||
float scale = ImGui::GetTextLineHeight() / EFB_HEIGHT;
|
||||
float scale_height = ImGui::GetTextLineHeight() / EFB_HEIGHT;
|
||||
if (show_raw_scissors)
|
||||
scale += ImGui::GetTextLineHeightWithSpacing() / EFB_HEIGHT;
|
||||
scale_height += ImGui::GetTextLineHeightWithSpacing() / EFB_HEIGHT;
|
||||
ImVec2 p2 = ImGui::GetCursorScreenPos();
|
||||
// Use a height of 1 since we want this to span two table rows (if possible)
|
||||
ImGui::Dummy(ImVec2(EFB_WIDTH * scale, 1));
|
||||
ImGui::Dummy(ImVec2(EFB_WIDTH * scale_height, 1));
|
||||
for (size_t i = 0; i < info.m_result.size(); i++)
|
||||
{
|
||||
// The last entry in the sorted list of results is the one that is used by hardware backends
|
||||
@ -350,11 +350,12 @@ void Statistics::DisplayScissor()
|
||||
const ImU32 new_col = (col & ~IM_COL32_A_MASK) | (new_alpha << IM_COL32_A_SHIFT);
|
||||
|
||||
const auto& r = info.m_result[i];
|
||||
draw_list->AddRectFilled(ImVec2(p2.x + r.rect.left * scale, p2.y + r.rect.top * scale),
|
||||
ImVec2(p2.x + r.rect.right * scale, p2.y + r.rect.bottom * scale),
|
||||
new_col);
|
||||
draw_list->AddRectFilled(
|
||||
ImVec2(p2.x + r.rect.left * scale_height, p2.y + r.rect.top * scale_height),
|
||||
ImVec2(p2.x + r.rect.right * scale_height, p2.y + r.rect.bottom * scale_height), new_col);
|
||||
}
|
||||
draw_list->AddRect(p2, ImVec2(p2.x + EFB_WIDTH * scale, p2.y + EFB_HEIGHT * scale), light_grey);
|
||||
draw_list->AddRect(
|
||||
p2, ImVec2(p2.x + EFB_WIDTH * scale_height, p2.y + EFB_HEIGHT * scale_height), light_grey);
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("%d", int(info.m_result.size()));
|
||||
|
||||
@ -428,7 +429,7 @@ void Statistics::DisplayScissor()
|
||||
draw_scissor_table_header();
|
||||
for (size_t i = 0; i < scissors.size(); i++)
|
||||
draw_scissor_table_row(i);
|
||||
for (size_t i = scissors.size(); i < scissor_expected_count; i++)
|
||||
for (size_t i = scissors.size(); i < static_cast<size_t>(scissor_expected_count); i++)
|
||||
scissor_table_skip_row(i);
|
||||
ImGui::EndTable();
|
||||
}
|
||||
@ -440,7 +441,7 @@ void Statistics::DisplayScissor()
|
||||
draw_viewport_table_header();
|
||||
for (size_t i = 0; i < scissors.size(); i++)
|
||||
draw_viewport_table_row(i);
|
||||
for (size_t i = scissors.size(); i < scissor_expected_count; i++)
|
||||
for (size_t i = scissors.size(); i < static_cast<size_t>(scissor_expected_count); i++)
|
||||
viewport_table_skip_row(i);
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
Reference in New Issue
Block a user