Drop Host_GetRenderSurface and pass display to backend

This commit is contained in:
Stenzek
2018-10-03 23:03:13 +10:00
parent 134d967be2
commit a3961750a7
35 changed files with 129 additions and 124 deletions

View File

@ -54,7 +54,7 @@ void VideoBackend::InitBackendInfo()
g_Config.backend_info.AAModes = {1};
}
bool VideoBackend::Initialize(void* window_handle)
bool VideoBackend::Initialize(void* display_handle, void* window_handle)
{
InitializeShared();
@ -80,4 +80,4 @@ void VideoBackend::Shutdown()
ShutdownShared();
}
}
} // namespace Null

View File

@ -24,6 +24,11 @@ Renderer::~Renderer()
UpdateActiveConfig();
}
bool Renderer::IsHeadless() const
{
return true;
}
std::unique_ptr<AbstractTexture> Renderer::CreateTexture(const TextureConfig& config)
{
return std::make_unique<NullTexture>(config);

View File

@ -14,6 +14,8 @@ public:
Renderer();
~Renderer() override;
bool IsHeadless() const override;
std::unique_ptr<AbstractTexture> CreateTexture(const TextureConfig& config) override;
std::unique_ptr<AbstractStagingTexture>
CreateStagingTexture(StagingTextureType type, const TextureConfig& config) override;

View File

@ -11,7 +11,7 @@ namespace Null
{
class VideoBackend : public VideoBackendBase
{
bool Initialize(void* window_handle) override;
bool Initialize(void* display_handle, void* window_handle) override;
void Shutdown() override;
std::string GetName() const override { return "Null"; }
@ -22,4 +22,4 @@ class VideoBackend : public VideoBackendBase
}
void InitBackendInfo() override;
};
}
} // namespace Null