From d7f888429110f56cf0efa4b1ee1e705467246cec Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 13 Feb 2020 16:52:30 +0900 Subject: [PATCH] Qt: Fix compilation under clang-9 Fixes #23. --- src/core/gpu_hw.cpp | 4 ++-- src/duckstation-qt/qthostinterface.cpp | 5 ++++- src/duckstation-sdl/d3d11_host_display.h | 2 +- src/duckstation-sdl/opengl_host_display.h | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index 212f473a5..9f1b60edc 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -274,7 +274,7 @@ void GPU_HW::IncludeVRAMDityRectangle(const Common::Rectangle& rect) // shadow texture is updated if (!m_draw_mode.IsTexturePageChanged() && (m_draw_mode.GetTexturePageRectangle().Intersects(rect) || - m_draw_mode.IsUsingPalette() && m_draw_mode.GetTexturePaletteRectangle().Intersects(rect))) + (m_draw_mode.IsUsingPalette() && m_draw_mode.GetTexturePaletteRectangle().Intersects(rect)))) { m_draw_mode.SetTexturePageChanged(); } @@ -433,4 +433,4 @@ void GPU_HW::DrawRendererStats(bool is_idle_frame) ImGui::Columns(1); } -} \ No newline at end of file +} diff --git a/src/duckstation-qt/qthostinterface.cpp b/src/duckstation-qt/qthostinterface.cpp index 11f440838..35628b442 100644 --- a/src/duckstation-qt/qthostinterface.cpp +++ b/src/duckstation-qt/qthostinterface.cpp @@ -319,8 +319,11 @@ void QtHostInterface::updateControllerInputMap() continue; const auto button_names = Controller::GetButtonNames(ctype); - for (const auto& [button_name, button_code] : button_names) + for (const auto& it : button_names) { + const std::string& button_name = it.first; + const s32 button_code = it.second; + QVariant var = m_qsettings.value( QStringLiteral("Controller%1/Button%2").arg(controller_index + 1).arg(QString::fromStdString(button_name))); if (!var.isValid()) diff --git a/src/duckstation-sdl/d3d11_host_display.h b/src/duckstation-sdl/d3d11_host_display.h index fffd5d108..9260c7582 100644 --- a/src/duckstation-sdl/d3d11_host_display.h +++ b/src/duckstation-sdl/d3d11_host_display.h @@ -44,7 +44,7 @@ private: bool CreateSwapChainRTV(); bool CreateImGuiContext(); - void Render(); + void Render() override; void RenderDisplay(); SDL_Window* m_window = nullptr; diff --git a/src/duckstation-sdl/opengl_host_display.h b/src/duckstation-sdl/opengl_host_display.h index 4a05c0532..45ff35fab 100644 --- a/src/duckstation-sdl/opengl_host_display.h +++ b/src/duckstation-sdl/opengl_host_display.h @@ -39,7 +39,7 @@ private: bool CreateImGuiContext(); bool CreateGLResources(); - void Render(); + void Render() override; void RenderDisplay(); SDL_Window* m_window = nullptr;