Fix a bunch of compiler warnings

This commit is contained in:
Connor McLaughlin
2021-06-03 23:03:06 +10:00
parent 270bf59817
commit 350049826f
23 changed files with 41 additions and 39 deletions

View File

@ -1098,7 +1098,6 @@ void CommonHostInterface::DrawFPSWindow()
position_y += text_size.y + spacing; \
} while (0)
const System::State state = System::GetState();
if (System::GetState() == System::State::Running)
{
const float speed = System::GetEmulationSpeed();
@ -2015,7 +2014,7 @@ void CommonHostInterface::RegisterGeneralHotkeys()
});
RegisterHotkey(StaticString(TRANSLATABLE("Hotkeys", "General")), StaticString("ChangeDisc"),
StaticString(TRANSLATABLE("Hotkeys", "Change Disc")), [this](bool pressed) {
StaticString(TRANSLATABLE("Hotkeys", "Change Disc")), [](bool pressed) {
if (pressed && System::IsValid() && System::HasMediaSubImages())
{
const u32 current = System::GetMediaSubImageIndex();
@ -2887,7 +2886,6 @@ void CommonHostInterface::LoadSettings(SettingsInterface& si)
}
const bool input_display_enabled = si.GetBoolValue("Display", "ShowInputs", false);
const bool input_display_state = static_cast<bool>(s_input_overlay_ui);
if (input_display_enabled && !s_input_overlay_ui)
s_input_overlay_ui = std::make_unique<FrontendCommon::InputOverlayUI>();
else if (!input_display_enabled && s_input_overlay_ui)

View File

@ -2988,8 +2988,7 @@ void DrawGameListWindow()
if (BeginFullscreenColumnWindow(0.0f, 450.0f, "game_list_info", ImVec4(0.11f, 0.15f, 0.17f, 1.00f)))
{
const auto* window = ImGui::GetCurrentWindow();
const ImVec2 base_pos(window->DC.CursorPos);
const ImGuiWindow* window = ImGui::GetCurrentWindow();
ImGui::SetCursorPos(LayoutScale(ImVec2(50.0f, 50.0f)));
ImGui::Image(selected_entry ? GetGameListCover(selected_entry)->GetHandle() :
@ -4118,7 +4117,6 @@ void DrawAchievementWindow()
const ImVec4 background(0.13f, 0.13f, 0.13f, alpha);
const ImVec2 display_size(ImGui::GetIO().DisplaySize);
const float window_width = LayoutScale(LAYOUT_SCREEN_WIDTH);
const float heading_height = LayoutScale(heading_height_unscaled);
if (BeginFullscreenWindow(
@ -4129,6 +4127,8 @@ void DrawAchievementWindow()
bool visible, hovered;
bool pressed = MenuButtonFrame("achievements_heading", false, heading_height_unscaled, &visible, &hovered, &bb.Min,
&bb.Max, 0, alpha);
UNREFERENCED_VARIABLE(pressed);
if (visible)
{
const float padding = LayoutScale(10.0f);