From f181b457608682840e938d5a150c2e1eb0e07719 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 27 Dec 2020 02:22:33 +1000 Subject: [PATCH] libretro: Build fix --- .../libretro_d3d11_host_display.cpp | 2 +- .../libretro_d3d11_host_display.h | 3 ++- src/frontend-common/CMakeLists.txt | 12 ++++++------ src/frontend-common/d3d11_host_display.cpp | 2 ++ 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/duckstation-libretro/libretro_d3d11_host_display.cpp b/src/duckstation-libretro/libretro_d3d11_host_display.cpp index 741da2d11..82830807f 100644 --- a/src/duckstation-libretro/libretro_d3d11_host_display.cpp +++ b/src/duckstation-libretro/libretro_d3d11_host_display.cpp @@ -31,7 +31,7 @@ bool LibretroD3D11HostDisplay::RequestHardwareRendererContext(retro_hw_render_ca } bool LibretroD3D11HostDisplay::CreateRenderDevice(const WindowInfo& wi, std::string_view adapter_name, - bool debug_device) + bool debug_device, bool threaded_presentation) { retro_hw_render_interface* ri = nullptr; if (!g_retro_environment_callback(RETRO_ENVIRONMENT_GET_HW_RENDER_INTERFACE, &ri)) diff --git a/src/duckstation-libretro/libretro_d3d11_host_display.h b/src/duckstation-libretro/libretro_d3d11_host_display.h index 21f955be0..896f76a53 100644 --- a/src/duckstation-libretro/libretro_d3d11_host_display.h +++ b/src/duckstation-libretro/libretro_d3d11_host_display.h @@ -11,7 +11,8 @@ public: static bool RequestHardwareRendererContext(retro_hw_render_callback* cb); - bool CreateRenderDevice(const WindowInfo& wi, std::string_view adapter_name, bool debug_device) override; + bool CreateRenderDevice(const WindowInfo& wi, std::string_view adapter_name, bool debug_device, + bool threaded_presentation) override; void ResizeRenderWindow(s32 new_window_width, s32 new_window_height) override; bool ChangeRenderWindow(const WindowInfo& new_wi) override; diff --git a/src/frontend-common/CMakeLists.txt b/src/frontend-common/CMakeLists.txt index 546de75f9..48a5f6c7d 100644 --- a/src/frontend-common/CMakeLists.txt +++ b/src/frontend-common/CMakeLists.txt @@ -3,6 +3,12 @@ add_library(frontend-common game_settings.h opengl_host_display.cpp opengl_host_display.h + postprocessing_chain.cpp + postprocessing_chain.h + postprocessing_shader.cpp + postprocessing_shader.h + postprocessing_shadergen.cpp + postprocessing_shadergen.h vulkan_host_display.cpp vulkan_host_display.h ) @@ -50,12 +56,6 @@ if(NOT BUILD_LIBRETRO_CORE) imgui_styles.h ini_settings_interface.cpp ini_settings_interface.h - postprocessing_chain.cpp - postprocessing_chain.h - postprocessing_shader.cpp - postprocessing_shader.h - postprocessing_shadergen.cpp - postprocessing_shadergen.h save_state_selector_ui.cpp save_state_selector_ui.h ) diff --git a/src/frontend-common/d3d11_host_display.cpp b/src/frontend-common/d3d11_host_display.cpp index 3d17273ea..db3d98ecc 100644 --- a/src/frontend-common/d3d11_host_display.cpp +++ b/src/frontend-common/d3d11_host_display.cpp @@ -473,11 +473,13 @@ bool D3D11HostDisplay::CreateSwapChainRTV() m_window_info.surface_width = backbuffer_desc.Width; m_window_info.surface_height = backbuffer_desc.Height; +#ifdef WITH_IMGUI if (ImGui::GetCurrentContext()) { ImGui::GetIO().DisplaySize.x = static_cast(backbuffer_desc.Width); ImGui::GetIO().DisplaySize.y = static_cast(backbuffer_desc.Height); } +#endif return true; }