mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Drop Host_GetRenderSurface and pass display to backend
This commit is contained in:
@ -86,7 +86,6 @@ Renderer::Renderer(int backbuffer_width, int backbuffer_height)
|
||||
if (SConfig::GetInstance().bWii)
|
||||
m_aspect_wide = Config::Get(Config::SYSCONF_WIDESCREEN);
|
||||
|
||||
m_surface_handle = Host_GetRenderHandle();
|
||||
m_last_host_config_bits = ShaderHostConfig::GetCurrent().bits;
|
||||
m_last_efb_multisamples = g_ActiveConfig.iMultisamples;
|
||||
}
|
||||
@ -408,7 +407,7 @@ float Renderer::CalculateDrawAspectRatio() const
|
||||
|
||||
bool Renderer::IsHeadless() const
|
||||
{
|
||||
return !m_surface_handle;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Renderer::ChangeSurface(void* new_surface_handle)
|
||||
|
@ -77,6 +77,8 @@ public:
|
||||
|
||||
using ClearColor = std::array<float, 4>;
|
||||
|
||||
virtual bool IsHeadless() const = 0;
|
||||
|
||||
virtual void SetPipeline(const AbstractPipeline* pipeline) {}
|
||||
virtual void SetScissorRect(const MathUtil::Rectangle<int>& rc) {}
|
||||
virtual void SetTexture(u32 index, const AbstractTexture* texture) {}
|
||||
@ -134,7 +136,6 @@ public:
|
||||
|
||||
const TargetRectangle& GetTargetRectangle() const { return m_target_rectangle; }
|
||||
float CalculateDrawAspectRatio() const;
|
||||
bool IsHeadless() const;
|
||||
|
||||
std::tuple<float, float> ScaleToDisplayAspectRatio(int width, int height) const;
|
||||
void UpdateDrawRectangle();
|
||||
@ -236,7 +237,6 @@ protected:
|
||||
|
||||
std::unique_ptr<PostProcessingShaderImplementation> m_post_processor;
|
||||
|
||||
void* m_surface_handle = nullptr;
|
||||
void* m_new_surface_handle = nullptr;
|
||||
Common::Flag m_surface_changed;
|
||||
Common::Flag m_surface_resized;
|
||||
|
@ -35,7 +35,7 @@ class VideoBackendBase
|
||||
{
|
||||
public:
|
||||
virtual ~VideoBackendBase() {}
|
||||
virtual bool Initialize(void* window_handle) = 0;
|
||||
virtual bool Initialize(void* display_handle, void* window_handle) = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
|
||||
virtual std::string GetName() const = 0;
|
||||
|
Reference in New Issue
Block a user