From 8f3162675f38b454fdcb2e33e3dc1c779e0c114a Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 7 Jul 2021 19:53:10 +1000 Subject: [PATCH] Warning fixes --- src/core/system.cpp | 3 --- src/frontend-common/fullscreen_ui.cpp | 7 ++++--- src/frontend-common/imgui_fullscreen.cpp | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/core/system.cpp b/src/core/system.cpp index c558596dd..35ad972bd 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -1537,9 +1537,6 @@ void Throttle() static constexpr double MAX_VARIANCE_TIME_NS = 50 * 1000000; #endif - // Don't sleep for <1ms or >=period. - static constexpr double MINIMUM_SLEEP_TIME_NS = 1 * 1000000; - // Use unsigned for defined overflow/wrap-around. const Common::Timer::Value time = Common::Timer::GetValue(); const double sleep_time = (s_next_frame_time >= time) ? diff --git a/src/frontend-common/fullscreen_ui.cpp b/src/frontend-common/fullscreen_ui.cpp index 52a2a408d..297bbef09 100644 --- a/src/frontend-common/fullscreen_ui.cpp +++ b/src/frontend-common/fullscreen_ui.cpp @@ -4474,7 +4474,6 @@ static void DrawLeaderboardEntry(const Cheevos::LeaderboardEntry& lbEntry, float if (!visible) return; - const float spacing = LayoutScale(10.0f); const float midpoint = bb.Min.y + g_large_font->FontSize + LayoutScale(4.0f); float text_start_x = bb.Min.x + LayoutScale(15.0f); SmallString text; @@ -4780,6 +4779,7 @@ bool SetControllerNavInput(FrontendCommon::ControllerNavigationButton button, bo if (!HasActiveWindow()) return false; +#if 0 // This is a bit hacky.. ImGuiIO& io = ImGui::GetIO(); @@ -4789,10 +4789,11 @@ bool SetControllerNavInput(FrontendCommon::ControllerNavigationButton button, bo io.KeysDown[io.KeyMap[imkey]] = value; \ } - // MAP_KEY(FrontendCommon::ControllerNavigationButton::LeftTrigger, ImGuiKey_PageUp); - // MAP_KEY(FrontendCommon::ControllerNavigationButton::RightTrigger, ImGuiKey_PageDown); + MAP_KEY(FrontendCommon::ControllerNavigationButton::LeftTrigger, ImGuiKey_PageUp); + MAP_KEY(FrontendCommon::ControllerNavigationButton::RightTrigger, ImGuiKey_PageDown); #undef MAP_KEY +#endif return true; } diff --git a/src/frontend-common/imgui_fullscreen.cpp b/src/frontend-common/imgui_fullscreen.cpp index 04b939a9d..2ba32d9cc 100644 --- a/src/frontend-common/imgui_fullscreen.cpp +++ b/src/frontend-common/imgui_fullscreen.cpp @@ -1036,7 +1036,6 @@ void RightAlignNavButtons(u32 num_items /*= 0*/, float item_width /*= LAYOUT_MEN float item_height /*= LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY*/) { ImGuiWindow* window = ImGui::GetCurrentWindow(); - const ImVec2 window_size(ImGui::GetWindowSize()); const ImGuiStyle& style = ImGui::GetStyle(); const float total_item_width =