mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Drop Host_GetRenderSurface and pass display to backend
This commit is contained in:
@ -804,6 +804,11 @@ Renderer::Renderer()
|
||||
|
||||
Renderer::~Renderer() = default;
|
||||
|
||||
bool Renderer::IsHeadless() const
|
||||
{
|
||||
return g_main_gl_context->IsHeadless();
|
||||
}
|
||||
|
||||
void Renderer::Shutdown()
|
||||
{
|
||||
::Renderer::Shutdown();
|
||||
@ -1499,9 +1504,8 @@ void Renderer::CheckForSurfaceChange()
|
||||
if (!m_surface_changed.TestAndClear())
|
||||
return;
|
||||
|
||||
m_surface_handle = m_new_surface_handle;
|
||||
g_main_gl_context->UpdateSurface(m_new_surface_handle);
|
||||
m_new_surface_handle = nullptr;
|
||||
g_main_gl_context->UpdateSurface(m_surface_handle);
|
||||
|
||||
// With a surface change, the window likely has new dimensions.
|
||||
m_backbuffer_width = g_main_gl_context->GetBackBufferWidth();
|
||||
|
@ -84,6 +84,8 @@ public:
|
||||
Renderer();
|
||||
~Renderer() override;
|
||||
|
||||
bool IsHeadless() const override;
|
||||
|
||||
void Init();
|
||||
void Shutdown() override;
|
||||
|
||||
|
@ -11,7 +11,7 @@ namespace OGL
|
||||
{
|
||||
class VideoBackend : public VideoBackendBase
|
||||
{
|
||||
bool Initialize(void*) override;
|
||||
bool Initialize(void* display_handle, void* window_handle) override;
|
||||
void Shutdown() override;
|
||||
|
||||
std::string GetName() const override;
|
||||
@ -23,4 +23,4 @@ private:
|
||||
bool InitializeGLExtensions();
|
||||
bool FillBackendInfo();
|
||||
};
|
||||
}
|
||||
} // namespace OGL
|
||||
|
@ -157,7 +157,7 @@ bool VideoBackend::FillBackendInfo()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VideoBackend::Initialize(void* window_handle)
|
||||
bool VideoBackend::Initialize(void* display_handle, void* window_handle)
|
||||
{
|
||||
InitializeShared();
|
||||
|
||||
|
Reference in New Issue
Block a user