Warning fixes

This commit is contained in:
Connor McLaughlin 2021-07-07 19:53:10 +10:00
parent 2cf6e8f5c9
commit 8f3162675f
3 changed files with 4 additions and 7 deletions

View file

@ -1537,9 +1537,6 @@ void Throttle()
static constexpr double MAX_VARIANCE_TIME_NS = 50 * 1000000; static constexpr double MAX_VARIANCE_TIME_NS = 50 * 1000000;
#endif #endif
// Don't sleep for <1ms or >=period.
static constexpr double MINIMUM_SLEEP_TIME_NS = 1 * 1000000;
// Use unsigned for defined overflow/wrap-around. // Use unsigned for defined overflow/wrap-around.
const Common::Timer::Value time = Common::Timer::GetValue(); const Common::Timer::Value time = Common::Timer::GetValue();
const double sleep_time = (s_next_frame_time >= time) ? const double sleep_time = (s_next_frame_time >= time) ?

View file

@ -4474,7 +4474,6 @@ static void DrawLeaderboardEntry(const Cheevos::LeaderboardEntry& lbEntry, float
if (!visible) if (!visible)
return; return;
const float spacing = LayoutScale(10.0f);
const float midpoint = bb.Min.y + g_large_font->FontSize + LayoutScale(4.0f); const float midpoint = bb.Min.y + g_large_font->FontSize + LayoutScale(4.0f);
float text_start_x = bb.Min.x + LayoutScale(15.0f); float text_start_x = bb.Min.x + LayoutScale(15.0f);
SmallString text; SmallString text;
@ -4780,6 +4779,7 @@ bool SetControllerNavInput(FrontendCommon::ControllerNavigationButton button, bo
if (!HasActiveWindow()) if (!HasActiveWindow())
return false; return false;
#if 0
// This is a bit hacky.. // This is a bit hacky..
ImGuiIO& io = ImGui::GetIO(); ImGuiIO& io = ImGui::GetIO();
@ -4789,10 +4789,11 @@ bool SetControllerNavInput(FrontendCommon::ControllerNavigationButton button, bo
io.KeysDown[io.KeyMap[imkey]] = value; \ io.KeysDown[io.KeyMap[imkey]] = value; \
} }
// MAP_KEY(FrontendCommon::ControllerNavigationButton::LeftTrigger, ImGuiKey_PageUp); MAP_KEY(FrontendCommon::ControllerNavigationButton::LeftTrigger, ImGuiKey_PageUp);
// MAP_KEY(FrontendCommon::ControllerNavigationButton::RightTrigger, ImGuiKey_PageDown); MAP_KEY(FrontendCommon::ControllerNavigationButton::RightTrigger, ImGuiKey_PageDown);
#undef MAP_KEY #undef MAP_KEY
#endif
return true; return true;
} }

View file

@ -1036,7 +1036,6 @@ void RightAlignNavButtons(u32 num_items /*= 0*/, float item_width /*= LAYOUT_MEN
float item_height /*= LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY*/) float item_height /*= LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY*/)
{ {
ImGuiWindow* window = ImGui::GetCurrentWindow(); ImGuiWindow* window = ImGui::GetCurrentWindow();
const ImVec2 window_size(ImGui::GetWindowSize());
const ImGuiStyle& style = ImGui::GetStyle(); const ImGuiStyle& style = ImGui::GetStyle();
const float total_item_width = const float total_item_width =