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;
#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) ?

View File

@ -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;
}

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*/)
{
ImGuiWindow* window = ImGui::GetCurrentWindow();
const ImVec2 window_size(ImGui::GetWindowSize());
const ImGuiStyle& style = ImGui::GetStyle();
const float total_item_width =