From 93992ee1c114ede18684420bedf205f0a0a93c22 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Sat, 16 Dec 2023 00:27:35 +0100 Subject: [PATCH] ImGui: Fix Wsign-compare compiler warning. --- pcsx2/ImGui/ImGuiOverlays.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcsx2/ImGui/ImGuiOverlays.cpp b/pcsx2/ImGui/ImGuiOverlays.cpp index 8aaafc05639f1..9ba372957ed38 100644 --- a/pcsx2/ImGui/ImGuiOverlays.cpp +++ b/pcsx2/ImGui/ImGuiOverlays.cpp @@ -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); @@ -915,7 +915,7 @@ void SaveStateSelectorUI::Draw() const ListEntry& entry = s_slots[i]; const float y_start = item_height * static_cast(i); - if (i == current_slot) + if (i == static_cast(current_slot)) { ImGui::SetCursorPosY(y_start);