Skip to content

Commit

Permalink
ImGui: Fix Wsign-compare compiler warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
lightningterror committed Dec 16, 2023
1 parent e29bc93 commit 93992ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pcsx2/ImGui/ImGuiOverlays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -899,12 +899,12 @@ void SaveStateSelectorUI::Draw()
// Leave 2 lines for the legend
const float legend_margin = ImGui::GetFontSize() * 2.0f + ImGui::GetStyle().ItemSpacing.y * 3.0f;
const float padding = 10.0f * scale;
const s32 current_slot = s_current_slot.load(std::memory_order_acquire);

ImGui::BeginChild("##item_list", ImVec2(0, -legend_margin), false,
ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoTitleBar |
ImGuiWindowFlags_NoBackground);
{
const s32 current_slot = s_current_slot.load(std::memory_order_acquire);
const ImVec2 image_size = ImVec2(128.0f * scale, (128.0f / (4.0f / 3.0f)) * scale);
const float item_width = std::floor(width - (padding_and_rounding * 2.0f) - ImGui::GetStyle().ScrollbarSize);
const float item_height = std::floor(image_size.y + padding * 2.0f);
Expand All @@ -915,7 +915,7 @@ void SaveStateSelectorUI::Draw()
const ListEntry& entry = s_slots[i];
const float y_start = item_height * static_cast<float>(i);

if (i == current_slot)
if (i == static_cast<size_t>(current_slot))
{
ImGui::SetCursorPosY(y_start);

Expand Down

0 comments on commit 93992ee

Please sign in to comment.