FrontendCommon: Remove unnecessary #ifndef LIBRETRO macros

These were only needed because of ancient compilers on the libretro
buildbot, it still compiles fine with these fields on the latest
compilers.
This commit is contained in:
Connor McLaughlin
2020-12-27 00:11:31 +10:00
parent 702ed21207
commit dc46d52029
6 changed files with 11 additions and 130 deletions

View File

@@ -5,6 +5,7 @@
#include "common/window_info.h"
#include "common/windows_headers.h"
#include "core/host_display.h"
#include "frontend-common/postprocessing_chain.h"
#include <d3d11.h>
#include <dxgi.h>
#include <memory>
@@ -13,10 +14,6 @@
#include <vector>
#include <wrl/client.h>
#ifndef LIBRETRO
#include "frontend-common/postprocessing_chain.h"
#endif
namespace FrontendCommon {
class D3D11HostDisplay : public HostDisplay
@@ -35,8 +32,10 @@ public:
virtual bool HasRenderDevice() const override;
virtual bool HasRenderSurface() const override;
virtual bool CreateRenderDevice(const WindowInfo& wi, std::string_view adapter_name, bool debug_device, bool threaded_presentation) override;
virtual bool InitializeRenderDevice(std::string_view shader_cache_directory, bool debug_device, bool threaded_presentation) override;
virtual bool CreateRenderDevice(const WindowInfo& wi, std::string_view adapter_name, bool debug_device,
bool threaded_presentation) override;
virtual bool InitializeRenderDevice(std::string_view shader_cache_directory, bool debug_device,
bool threaded_presentation) override;
virtual void DestroyRenderDevice() override;
virtual bool MakeRenderContextCurrent() override;
@@ -66,21 +65,17 @@ public:
virtual bool Render() override;
#ifndef LIBRETRO
struct AdapterInfo
{
std::vector<std::string> adapter_names;
std::vector<std::string> fullscreen_modes;
};
static AdapterInfo GetAdapterInfo();
#endif
protected:
static constexpr u32 DISPLAY_UNIFORM_BUFFER_SIZE = 16;
#ifndef LIBRETRO
static AdapterInfo GetAdapterInfo(IDXGIFactory* dxgi_factory);
#endif
virtual bool CreateResources() override;
virtual void DestroyResources() override;
@@ -88,10 +83,8 @@ protected:
virtual bool CreateImGuiContext();
virtual void DestroyImGuiContext();
#ifndef LIBRETRO
bool CreateSwapChain(const DXGI_MODE_DESC* fullscreen_mode);
bool CreateSwapChainRTV();
#endif
void RenderDisplay();
void RenderSoftwareCursor();
@@ -102,7 +95,6 @@ protected:
s32 texture_view_height, bool linear_filter);
void RenderSoftwareCursor(s32 left, s32 top, s32 width, s32 height, HostDisplayTexture* texture_handle);
#ifndef LIBRETRO
struct PostProcessingStage
{
ComPtr<ID3D11VertexShader> vertex_shader;
@@ -116,16 +108,13 @@ protected:
s32 final_height, void* texture_handle, u32 texture_width, s32 texture_height,
s32 texture_view_x, s32 texture_view_y, s32 texture_view_width,
s32 texture_view_height);
#endif
ComPtr<ID3D11Device> m_device;
ComPtr<ID3D11DeviceContext> m_context;
#ifndef LIBRETRO
ComPtr<IDXGIFactory> m_dxgi_factory;
ComPtr<IDXGISwapChain> m_swap_chain;
ComPtr<ID3D11RenderTargetView> m_swap_chain_rtv;
#endif
ComPtr<ID3D11RasterizerState> m_display_rasterizer_state;
ComPtr<ID3D11DepthStencilState> m_display_depth_stencil_state;
@@ -140,7 +129,6 @@ protected:
D3D11::StreamBuffer m_display_uniform_buffer;
D3D11::AutoStagingTexture m_readback_staging_texture;
#ifndef LIBRETRO
bool m_allow_tearing_supported = false;
bool m_using_flip_model_swap_chain = true;
bool m_using_allow_tearing = false;
@@ -149,7 +137,6 @@ protected:
PostProcessingChain m_post_processing_chain;
D3D11::Texture m_post_processing_input_texture;
std::vector<PostProcessingStage> m_post_processing_stages;
#endif
};
} // namespace FrontendCommon