VideoBackends: Pass window system info from host on creation

This commit is contained in:
Stenzek
2018-10-03 23:03:22 +10:00
parent 9c57a98723
commit eb284b5d66
26 changed files with 148 additions and 75 deletions

View File

@ -82,8 +82,7 @@ void* GLContext::GetFuncAddress(const std::string& name)
return nullptr;
}
std::unique_ptr<GLContext> GLContext::Create(void* display_handle, void* window_handle, bool stereo,
bool core)
std::unique_ptr<GLContext> GLContext::Create(const WindowSystemInfo& wsi, bool stereo, bool core)
{
std::unique_ptr<GLContext> context;
#if defined(__APPLE__)
@ -103,7 +102,7 @@ std::unique_ptr<GLContext> GLContext::Create(void* display_handle, void* window_
#else
return nullptr;
#endif
if (!context->Initialize(display_handle, window_handle, stereo, core))
if (!context->Initialize(wsi.display_connection, wsi.render_surface, stereo, core))
return nullptr;
return context;